Blog

Try This Online Java Gotchas Quiz

February 21, 2021
Alan Richardson

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"

Challenge The Sensei
Share on social
태그라인

Govern AI-driven development before it ships

Measure AI-assisted risk, enforce secure coding policy at commit, and accelerate secure delivery across your SDLC.

book a demo
태그라인

Explore more blogs

우리는 이 방법을 잘 알고 있습니다. 우리는 이 두 가지 축복을 골고루 살기 위해 노력하고 있습니다.

browse all
Case Study
Filter Label
This is some text inside of a div block.

Supercharged Security Awareness: How Tournaments are Inspiring Developers at Erste Group

Learn More
Case Study
Filter Label
This is some text inside of a div block.

Security as culture: How Blue Prism cultivates world-class secure developers

Learn how Blue Prism, the global leader in intelligent automation for the enterprise, used Secure Code Warrior's agile learning platform to create a security-first culture with their developers, achieve their business goals, and ship secure code at speed

Learn More
Case Study
Filter Label
This is some text inside of a div block.

One Culture of Security: How Sage built their security champions program with agile secure code learning

Discover how Sage enhanced security with a flexible, relationship-focused approach, creating 200+ security champions and achieving measurable risk reduction.

Learn More
Case Study
Filter Label
This is some text inside of a div block.

Enabler 2: Senior Leadership Sponsorship

Explore Enabler 2: Senior Leadership Sponsorship. Learn why active buy-in from the CIO, CTO, and CISO is vital to drive developer adoption and program credibility.

Learn More
Case Study
Filter Label
This is some text inside of a div block.

Observe and Secure the ADLC: A Four-Point Framework for CISOs and Development Teams Using AI

While development teams look to make the most of GenAI’s undeniable benefits, we’d like to propose a four-point foundational framework that will allow security leaders to deploy AI coding tools and agents with a higher, more relevant standard of security best practices. It details exactly what enterprises can do to ensure safe, secure code development right now, and as agentic AI becomes an even bigger factor in the future.

Learn More
Case Study
Filter Label
This is some text inside of a div block.

Cybermon Is Back: Beat the Boss AI Missions Now Available On Demand

Cybermon 2025 Beat the Boss is now available year-round in SCW. Deploy advanced AI/LLM security challenges to strengthen secure AI development at scale.

Learn More

Secure AI-driven development before it ships

See developer risk, enforce policy, and prevent vulnerabilities across your software development lifecycle.

book a demo