
试试这个在线 Java Gotchas 测验
之前的一篇博客文章描述了Java的陷阱 “按位运算符与布尔运算符”。
我们在一个名为 “Challenge The Sensei” 的有趣小测验中加入了这个变体以及其他一些 Java 陷阱。
如果你已经阅读了上面的博客文章,那么你将是回答至少一个问题的好地方。
但是你的朋友可能不会,所以如果你觉得测验很有趣,你可以与他们分享,看看他们的分数是否和你一样。
因为我们不想只问你。我们想尝试用它来帮助教育和编纂知识。因此,我们创建了一个 Github 存储库,其中包含问题和解决方案的可运行代码示例。
这是一个 老师 已启用 repo。
当你克隆仓库并将其加载到 IntelliJ 时,假设你有 Secure Code Warrior 老师 安装了 IntelliJ 插件,它会自动看到你有一个 .sensei 文件夹,然后加载了 Sensei 食谱。
在 IDE 中浏览代码时,你应该看到 IntelliJ 提示你代码中存在错误,这应该可以更容易地看到代码中的问题:
- 将鼠标悬停在突出显示的代码上然后你会看到一条提示你错误的提示
- 使用 “显示上下文操作” 键:alt+Enter(Windows)选项+回车键(macOS),我们可能会有可以修复代码的 QuickFix。
添加了 Sensei 食谱,用于:
我们将来会添加更多的配方和更多的解释性文本,以涵盖其余的代码... 但不要让这阻止你自己查看代码并发现错误。
记得试试测验然后”挑战老师“

Alan Richardson has more than twenty years of professional IT experience, working as a developer and at every level of the testing hierarchy from Tester through to Head of Testing. Head of Developer Relations at Secure Code Warrior, he works directly with teams, to improve the development of quality secure code. Alan is the author of four books including “Dear Evil Tester”, and “Java For Testers”. Alan has also created online training courses to help people learn Technical Web Testing and Selenium WebDriver with Java. Alan posts his writing and training videos on SeleniumSimplified.com, EvilTester.com, JavaForTesters.com, and CompendiumDev.co.uk.

Secure Code Warrior可以帮助您的组织在整个软件开发生命周期中保护代码,并营造一种将网络安全放在首位的文化。无论您是 AppSec 经理、开发人员、首席信息安全官还是任何与安全相关的人,我们都可以帮助您的组织降低与不安全代码相关的风险。
预订演示Alan Richardson has more than twenty years of professional IT experience, working as a developer and at every level of the testing hierarchy from Tester through to Head of Testing. Head of Developer Relations at Secure Code Warrior, he works directly with teams, to improve the development of quality secure code. Alan is the author of four books including “Dear Evil Tester”, and “Java For Testers”. Alan has also created online training courses to help people learn Technical Web Testing and Selenium WebDriver with Java. Alan posts his writing and training videos on SeleniumSimplified.com, EvilTester.com, JavaForTesters.com, and CompendiumDev.co.uk.


之前的一篇博客文章描述了Java的陷阱 “按位运算符与布尔运算符”。
我们在一个名为 “Challenge The Sensei” 的有趣小测验中加入了这个变体以及其他一些 Java 陷阱。
如果你已经阅读了上面的博客文章,那么你将是回答至少一个问题的好地方。
但是你的朋友可能不会,所以如果你觉得测验很有趣,你可以与他们分享,看看他们的分数是否和你一样。
因为我们不想只问你。我们想尝试用它来帮助教育和编纂知识。因此,我们创建了一个 Github 存储库,其中包含问题和解决方案的可运行代码示例。
这是一个 老师 已启用 repo。
当你克隆仓库并将其加载到 IntelliJ 时,假设你有 Secure Code Warrior 老师 安装了 IntelliJ 插件,它会自动看到你有一个 .sensei 文件夹,然后加载了 Sensei 食谱。
在 IDE 中浏览代码时,你应该看到 IntelliJ 提示你代码中存在错误,这应该可以更容易地看到代码中的问题:
- 将鼠标悬停在突出显示的代码上然后你会看到一条提示你错误的提示
- 使用 “显示上下文操作” 键:alt+Enter(Windows)选项+回车键(macOS),我们可能会有可以修复代码的 QuickFix。
添加了 Sensei 食谱,用于:
我们将来会添加更多的配方和更多的解释性文本,以涵盖其余的代码... 但不要让这阻止你自己查看代码并发现错误。
记得试试测验然后”挑战老师“


之前的一篇博客文章描述了Java的陷阱 “按位运算符与布尔运算符”。
我们在一个名为 “Challenge The Sensei” 的有趣小测验中加入了这个变体以及其他一些 Java 陷阱。
如果你已经阅读了上面的博客文章,那么你将是回答至少一个问题的好地方。
但是你的朋友可能不会,所以如果你觉得测验很有趣,你可以与他们分享,看看他们的分数是否和你一样。
因为我们不想只问你。我们想尝试用它来帮助教育和编纂知识。因此,我们创建了一个 Github 存储库,其中包含问题和解决方案的可运行代码示例。
这是一个 老师 已启用 repo。
当你克隆仓库并将其加载到 IntelliJ 时,假设你有 Secure Code Warrior 老师 安装了 IntelliJ 插件,它会自动看到你有一个 .sensei 文件夹,然后加载了 Sensei 食谱。
在 IDE 中浏览代码时,你应该看到 IntelliJ 提示你代码中存在错误,这应该可以更容易地看到代码中的问题:
- 将鼠标悬停在突出显示的代码上然后你会看到一条提示你错误的提示
- 使用 “显示上下文操作” 键:alt+Enter(Windows)选项+回车键(macOS),我们可能会有可以修复代码的 QuickFix。
添加了 Sensei 食谱,用于:
我们将来会添加更多的配方和更多的解释性文本,以涵盖其余的代码... 但不要让这阻止你自己查看代码并发现错误。
记得试试测验然后”挑战老师“


点击下面的链接并下载此资源的PDF。
Secure Code Warrior可以帮助您的组织在整个软件开发生命周期中保护代码,并营造一种将网络安全放在首位的文化。无论您是 AppSec 经理、开发人员、首席信息安全官还是任何与安全相关的人,我们都可以帮助您的组织降低与不安全代码相关的风险。
查看报告预订演示Alan Richardson has more than twenty years of professional IT experience, working as a developer and at every level of the testing hierarchy from Tester through to Head of Testing. Head of Developer Relations at Secure Code Warrior, he works directly with teams, to improve the development of quality secure code. Alan is the author of four books including “Dear Evil Tester”, and “Java For Testers”. Alan has also created online training courses to help people learn Technical Web Testing and Selenium WebDriver with Java. Alan posts his writing and training videos on SeleniumSimplified.com, EvilTester.com, JavaForTesters.com, and CompendiumDev.co.uk.
之前的一篇博客文章描述了Java的陷阱 “按位运算符与布尔运算符”。
我们在一个名为 “Challenge The Sensei” 的有趣小测验中加入了这个变体以及其他一些 Java 陷阱。
如果你已经阅读了上面的博客文章,那么你将是回答至少一个问题的好地方。
但是你的朋友可能不会,所以如果你觉得测验很有趣,你可以与他们分享,看看他们的分数是否和你一样。
因为我们不想只问你。我们想尝试用它来帮助教育和编纂知识。因此,我们创建了一个 Github 存储库,其中包含问题和解决方案的可运行代码示例。
这是一个 老师 已启用 repo。
当你克隆仓库并将其加载到 IntelliJ 时,假设你有 Secure Code Warrior 老师 安装了 IntelliJ 插件,它会自动看到你有一个 .sensei 文件夹,然后加载了 Sensei 食谱。
在 IDE 中浏览代码时,你应该看到 IntelliJ 提示你代码中存在错误,这应该可以更容易地看到代码中的问题:
- 将鼠标悬停在突出显示的代码上然后你会看到一条提示你错误的提示
- 使用 “显示上下文操作” 键:alt+Enter(Windows)选项+回车键(macOS),我们可能会有可以修复代码的 QuickFix。
添加了 Sensei 食谱,用于:
我们将来会添加更多的配方和更多的解释性文本,以涵盖其余的代码... 但不要让这阻止你自己查看代码并发现错误。
记得试试测验然后”挑战老师“

目录
Alan Richardson has more than twenty years of professional IT experience, working as a developer and at every level of the testing hierarchy from Tester through to Head of Testing. Head of Developer Relations at Secure Code Warrior, he works directly with teams, to improve the development of quality secure code. Alan is the author of four books including “Dear Evil Tester”, and “Java For Testers”. Alan has also created online training courses to help people learn Technical Web Testing and Selenium WebDriver with Java. Alan posts his writing and training videos on SeleniumSimplified.com, EvilTester.com, JavaForTesters.com, and CompendiumDev.co.uk.

Secure Code Warrior可以帮助您的组织在整个软件开发生命周期中保护代码,并营造一种将网络安全放在首位的文化。无论您是 AppSec 经理、开发人员、首席信息安全官还是任何与安全相关的人,我们都可以帮助您的组织降低与不安全代码相关的风险。
预订演示下载帮助您入门的资源
Threat Modeling with AI: Turning Every Developer into a Threat Modeler
Walk away better equipped to help developers combine threat modeling ideas and techniques with the AI tools they're already using to strengthen security, improve collaboration, and build more resilient software from the start.




%20(1).avif)
.avif)
