Quizzes

Java quizzes

Choose a quiz and test your understanding of a focused concept.

C++ & Java Branch Prediction Quiz: Why Sorted Arrays Run Faster

Test your understanding of branch prediction and CPU performance. Learn why sorted arrays can significantly speed up loops in C++ and Java.

HashMap vs Hashtable in Java Quiz: Differences, Performance, and Best Use Cases

Test your understanding of HashMap vs Hashtable in Java, including thread safety, null handling, performance, and modern usage.

Java Array to ArrayList Quiz: Conversion Techniques Explained

Test how to convert arrays to ArrayList in Java. Learn correct methods, pitfalls, and best practices.

Java InputStream to String Quiz: Best Practices Explained

Quiz your knowledge on converting InputStream to String in Java. Learn correct, efficient approaches for reading text streams safely.

Java Null Handling Quiz: Avoiding NullPointerException the Right Way

Test your skills in handling null in Java. Learn cleaner alternatives to null checks using Optional and best practices.

Java Random Integer Range Quiz: Generate int Values Correctly

Test your understanding of generating random int values in a range in Java using Random, ThreadLocalRandom, Math.random(), and safe bounds.

Understanding Android UserManager.isUserAGoat(): Joke API and Practical Lessons Quiz

Test your understanding of Android UserManager.isUserAGoat(), why it is a joke API, and what practical lessons it teaches developers.