Try This Online Java Gotchas Quiz
A previous blog post described the Java Gotcha "Bitwise vs Boolean Operator".
We added a variant of this, and some other Java Gotchas into a fun little Quiz called "Challenge The Sensei".
If you've read the blog post above then you'll be in a good place to ace at least one of the questions.
But your friends might not, so if you find the quiz fun, you can share it with them and see if they score as well as you.
Since we don't want to just quiz you. We want to try and use this to help educate and codify the knowledge. So we have created a Github repo that has runnable code examples for the problem, and the solution.
This is a Sensei enabled repo.
When you clone the repo and load it into IntelliJ, assuming you have the Secure Code Warrior Sensei IntelliJ Plugin installed, then it will automatically see that you have a .sensei folder, and load the Sensei recipes.
When browsing the code in the IDE you should see IntelliJ prompt you that the error exists in the code, and this should make it easier to see the gotcha in the code:
- Hover over the highlighted code then you'll see a prompt telling you about the error
- Use the Show Context Action key: alt+enter (Windows) option+enter (macOS) and we may have a QuickFix available that can fix the code.
Sensei recipes have been added for:
We are adding more recipes and more explanatory text to cover the rest of the code in the future... but don't let that stop you from having a look at the code and spotting the error yourself.
And remember to try the quiz and "Challenge the Sensei"



A fun little Java Gotchas quiz and supporting Github repo showing some gotchas and how to fix them
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 is here for your organization to help you secure code across the entire software development lifecycle and create a culture in which cybersecurity is top of mind. Whether you’re an AppSec Manager, Developer, CISO, or anyone involved in security, we can help your organization reduce risks associated with insecure code.
Book a demoAlan 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.


A previous blog post described the Java Gotcha "Bitwise vs Boolean Operator".
We added a variant of this, and some other Java Gotchas into a fun little Quiz called "Challenge The Sensei".
If you've read the blog post above then you'll be in a good place to ace at least one of the questions.
But your friends might not, so if you find the quiz fun, you can share it with them and see if they score as well as you.
Since we don't want to just quiz you. We want to try and use this to help educate and codify the knowledge. So we have created a Github repo that has runnable code examples for the problem, and the solution.
This is a Sensei enabled repo.
When you clone the repo and load it into IntelliJ, assuming you have the Secure Code Warrior Sensei IntelliJ Plugin installed, then it will automatically see that you have a .sensei folder, and load the Sensei recipes.
When browsing the code in the IDE you should see IntelliJ prompt you that the error exists in the code, and this should make it easier to see the gotcha in the code:
- Hover over the highlighted code then you'll see a prompt telling you about the error
- Use the Show Context Action key: alt+enter (Windows) option+enter (macOS) and we may have a QuickFix available that can fix the code.
Sensei recipes have been added for:
We are adding more recipes and more explanatory text to cover the rest of the code in the future... but don't let that stop you from having a look at the code and spotting the error yourself.
And remember to try the quiz and "Challenge the Sensei"


A previous blog post described the Java Gotcha "Bitwise vs Boolean Operator".
We added a variant of this, and some other Java Gotchas into a fun little Quiz called "Challenge The Sensei".
If you've read the blog post above then you'll be in a good place to ace at least one of the questions.
But your friends might not, so if you find the quiz fun, you can share it with them and see if they score as well as you.
Since we don't want to just quiz you. We want to try and use this to help educate and codify the knowledge. So we have created a Github repo that has runnable code examples for the problem, and the solution.
This is a Sensei enabled repo.
When you clone the repo and load it into IntelliJ, assuming you have the Secure Code Warrior Sensei IntelliJ Plugin installed, then it will automatically see that you have a .sensei folder, and load the Sensei recipes.
When browsing the code in the IDE you should see IntelliJ prompt you that the error exists in the code, and this should make it easier to see the gotcha in the code:
- Hover over the highlighted code then you'll see a prompt telling you about the error
- Use the Show Context Action key: alt+enter (Windows) option+enter (macOS) and we may have a QuickFix available that can fix the code.
Sensei recipes have been added for:
We are adding more recipes and more explanatory text to cover the rest of the code in the future... but don't let that stop you from having a look at the code and spotting the error yourself.
And remember to try the quiz and "Challenge the Sensei"


Click on the link below and download the PDF of this resource.
Secure Code Warrior is here for your organization to help you secure code across the entire software development lifecycle and create a culture in which cybersecurity is top of mind. Whether you’re an AppSec Manager, Developer, CISO, or anyone involved in security, we can help your organization reduce risks associated with insecure code.
View reportBook a demoAlan 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.
A previous blog post described the Java Gotcha "Bitwise vs Boolean Operator".
We added a variant of this, and some other Java Gotchas into a fun little Quiz called "Challenge The Sensei".
If you've read the blog post above then you'll be in a good place to ace at least one of the questions.
But your friends might not, so if you find the quiz fun, you can share it with them and see if they score as well as you.
Since we don't want to just quiz you. We want to try and use this to help educate and codify the knowledge. So we have created a Github repo that has runnable code examples for the problem, and the solution.
This is a Sensei enabled repo.
When you clone the repo and load it into IntelliJ, assuming you have the Secure Code Warrior Sensei IntelliJ Plugin installed, then it will automatically see that you have a .sensei folder, and load the Sensei recipes.
When browsing the code in the IDE you should see IntelliJ prompt you that the error exists in the code, and this should make it easier to see the gotcha in the code:
- Hover over the highlighted code then you'll see a prompt telling you about the error
- Use the Show Context Action key: alt+enter (Windows) option+enter (macOS) and we may have a QuickFix available that can fix the code.
Sensei recipes have been added for:
We are adding more recipes and more explanatory text to cover the rest of the code in the future... but don't let that stop you from having a look at the code and spotting the error yourself.
And remember to try the quiz and "Challenge the Sensei"

Table of contents
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 is here for your organization to help you secure code across the entire software development lifecycle and create a culture in which cybersecurity is top of mind. Whether you’re an AppSec Manager, Developer, CISO, or anyone involved in security, we can help your organization reduce risks associated with insecure code.
Book a demoDownloadResources to get you started
Secure by Design: Defining Best Practices, Enabling Developers and Benchmarking Preventative Security Outcomes
In this research paper, Secure Code Warrior co-founders, Pieter Danhieux and Dr. Matias Madou, Ph.D., along with expert contributors, Chris Inglis, Former US National Cyber Director (now Strategic Advisor to Paladin Capital Group), and Devin Lynch, Senior Director, Paladin Global Institute, will reveal key findings from over twenty in-depth interviews with enterprise security leaders including CISOs, a VP of Application Security, and software security professionals.
Benchmarking Security Skills: Streamlining Secure-by-Design in the Enterprise
Finding meaningful data on the success of Secure-by-Design initiatives is notoriously difficult. CISOs are often challenged when attempting to prove the return on investment (ROI) and business value of security program activities at both the people and company levels. Not to mention, it’s particularly difficult for enterprises to gain insights into how their organizations are benchmarked against current industry standards. The President’s National Cybersecurity Strategy challenged stakeholders to “embrace security and resilience by design.” The key to making Secure-by-Design initiatives work is not only giving developers the skills to ensure secure code, but also assuring the regulators that those skills are in place. In this presentation, we share a myriad of qualitative and quantitative data, derived from multiple primary sources, including internal data points collected from over 250,000 developers, data-driven customer insights, and public studies. Leveraging this aggregation of data points, we aim to communicate a vision of the current state of Secure-by-Design initiatives across multiple verticals. The report details why this space is currently underutilized, the significant impact a successful upskilling program can have on cybersecurity risk mitigation, and the potential to eliminate categories of vulnerabilities from a codebase.
Secure code training topics & content
Our industry-leading content is always evolving to fit the ever changing software development landscape with your role in mind. Topics covering everything from AI to XQuery Injection, offered for a variety of roles from Architects and Engineers to Product Managers and QA. Get a sneak peak of what our content catalog has to offer by topic and role.
Resources to get you started
Revealed: How the Cyber Industry Defines Secure by Design
In our latest white paper, our Co-Founders, Pieter Danhieux and Dr. Matias Madou, Ph.D., sat down with over twenty enterprise security leaders, including CISOs, AppSec leaders and security professionals, to figure out the key pieces of this puzzle and uncover the reality behind the Secure by Design movement. It’s a shared ambition across the security teams, but no shared playbook.
Is Vibe Coding Going to Turn Your Codebase Into a Frat Party?
Vibe coding is like a college frat party, and AI is the centerpiece of all the festivities, the keg. It’s a lot of fun to let loose, get creative, and see where your imagination can take you, but after a few keg stands, drinking (or, using AI) in moderation is undoubtedly the safer long-term solution.