- Executors
-
Learn
Learn Python Runnable examples, NumPy, pandas, and more Learn AI / Machine LearningNeural networks, ML and LLMs from scratch Learn C & C++ Pointers, memory, STL, and modern C++ Learn C#C# basics, OOP, LINQ, async, and .NET exercises Learn MatplotlibLine, bar, scatter and pie charts with live visualizers Learn RustOwnership, traits, error handling, and threads Learn GoSlices, interfaces, goroutines, and channels Python Algorithms Search, sorting, recursion, and visualizers O(n) C & C++ Algorithms Compare algorithms implemented in C and C++ Coding for Kids Learn to code by playing!
- QuizzesNew
- ChallengesNew
- For TeachersNew
- Updates
- Buy me a coffee
Java Quizzes
30 Java quizzes with 300 multiple-choice questions, from easy to hard. Every answer is explained.
30 quizzes · 300 questions
6 categories
Java 17
Java categories
4 Easy1 Medium
Primitives & Variables
Operators & Integer Division
Strings & String Methods
+2
0 of 5 passed
Start
1 Easy3 Medium1 Hard
Classes & Constructors
static & final
Inheritance & Polymorphism
+2
0 of 5 passed
Start
2 Easy2 Medium1 Hard
String Pool & Immutability
StringBuilder
Arrays
+2
0 of 5 passed
Start
1 Easy3 Medium1 Hard
ArrayList
HashMap
HashSet
+2
0 of 5 passed
Start
4 Medium1 Hard
Checked vs Unchecked Exceptions
try, catch & finally
Generics
+2
0 of 5 passed
Start
2 Medium3 Hard
Output-Based Java Questions
Is Java Pass by Value?
Tricky Java Questions
+2
0 of 5 passed
Start
matching quizzes
1
Primitives & Variables
Easy
Check how Java stores numbers, characters and booleans in its primitive types.
Java · Java Basics
#types#variables
10 questions · ~5 min
Not started
Start
2
Operators & Integer Division
Easy
Predict what Java's arithmetic, increment and logical operators really produce.
Java · Java Basics
#operators#arithmetic
10 questions · ~5 min
Not started
Start
3
Strings & String Methods
Easy
Check how Java strings compare, slice and behave as immutable objects.
Java · Java Basics
#strings#string-methods
10 questions · ~5 min
Not started
Start
4
Type Casting
Medium
Know when Java converts types for you, when you need a cast and what a cast can lose.
Java · Java Basics
#casting#types
10 questions · ~6 min
Not started
Start
5
if, switch & Loops
Easy
Trace Java's if statements, switch and loops and predict what they print.
Java · Java Basics
#loops#conditions
10 questions · ~5 min
Not started
Start
1
Classes & Constructors
Easy
Check how Java creates objects, runs constructors and shares references.
Java · Object-Oriented Java
#oop#classes
10 questions · ~5 min
Not started
Start
2
static & final
Medium
Know what belongs to the class, what belongs to each object and what can never change.
Java · Object-Oriented Java
#oop#static
10 questions · ~6 min
Not started
Start
3
Inheritance & Polymorphism
Medium
Predict which method runs when a subclass hides behind a parent reference.
Java · Object-Oriented Java
#oop#inheritance#polymorphism
10 questions · ~6 min
Not started
Start
4
Abstract Classes & Interfaces
Medium
Know when to use an abstract class, when to use an interface and what each one allows.
Java · Object-Oriented Java
#oop#interfaces#abstract-classes
10 questions · ~6 min
Not started
Start
5
equals() & hashCode()
Hard
Master the equals/hashCode contract and the HashSet and HashMap bugs that break it.
Java · Object-Oriented Java
#oop#interview
10 questions · ~8 min
Not started
Start
1
String Pool & Immutability
Medium
Know when two Java strings are the same object, why
== lies and why strings never change.
Java · Strings, Arrays & Wrappers
#strings#interview
10 questions · ~6 min
Not started
Start
2
StringBuilder
Easy
Build and edit text efficiently with Java's mutable StringBuilder.
Java · Strings, Arrays & Wrappers
#strings#stringbuilder
10 questions · ~5 min
Not started
Start
3
Arrays
Easy
Create, read, copy and compare Java arrays without the usual beginner surprises.
Java · Strings, Arrays & Wrappers
#arrays#references
10 questions · ~5 min
Not started
Start
4
Autoboxing & Wrapper Classes
Hard
Catch the Integer cache, null unboxing and other autoboxing traps before they reach production.
Java · Strings, Arrays & Wrappers
#wrappers#gotchas
10 questions · ~8 min
Not started
Start
5
Method Overloading
Medium
Predict which overloaded Java method gets called with widening, boxing, varargs and null.
Java · Strings, Arrays & Wrappers
#methods#overloading
10 questions · ~6 min
Not started
Start
1
ArrayList
Easy
Add, read, replace and remove elements in a Java ArrayList and avoid the immutable-list traps.
Java · Java Collections
#collections#list
10 questions · ~5 min
Not started
Start
2
HashMap
Medium
Store, update and look up key-value pairs in a Java HashMap and avoid the null and hashCode traps.
Java · Java Collections
#collections#map
10 questions · ~6 min
Not started
Start
3
HashSet
Medium
Keep unique values in Java sets and understand how equals and hashCode decide what a duplicate is.
Java · Java Collections
#collections#set
10 questions · ~6 min
Not started
Start
4
Iterators & ConcurrentModificationException
Hard
Remove elements while looping without ConcurrentModificationException, skipped items or surprises.
Java · Java Collections
#collections#gotchas
10 questions · ~8 min
Not started
Start
5
Comparable & Comparator
Medium
Sort Java objects by natural order or custom rules with Comparable, Comparator and its helper methods.
Java · Java Collections
#sorting#comparator
10 questions · ~6 min
Not started
Start
1
Checked vs Unchecked Exceptions
Medium
Know which Java exceptions the compiler forces you to handle and which ones it lets through.
Java · Exceptions & Modern Java
#exceptions#checked-exceptions
10 questions · ~6 min
Not started
Start
2
try, catch & finally
Medium
Trace exactly what runs, and in which order, when Java code throws, catches and cleans up.
Java · Exceptions & Modern Java
#exceptions#finally
10 questions · ~6 min
Not started
Start
3
Generics
Hard
Get past the tricky parts of Java generics, from type erasure to wildcards and raw types.
Java · Exceptions & Modern Java
#generics#type-safety
10 questions · ~8 min
Not started
Start
4
Lambdas & Streams
Medium
Read and predict Java stream pipelines, from filter and map to collectors and laziness.
Java · Exceptions & Modern Java
#streams#lambdas
10 questions · ~6 min
Not started
Start
5
Records, var & switch Expressions
Medium
Check your Java 17 basics with records, local variable type inference and the new switch.
Java · Exceptions & Modern Java
#modern-java#records
10 questions · ~6 min
Not started
Start
1
Output-Based Java Questions
Medium
Predict what short Java programs print, the way interview screens and written tests ask it.
Java · Java Interview Questions
#output-prediction#interview
10 questions · ~6 min
Not started
Start
2
Is Java Pass by Value?
Hard
Settle the classic interview question with code that shows what a method can and cannot change.
Java · Java Interview Questions
#interview#references
10 questions · ~8 min
Not started
Start
3
Tricky Java Questions
Hard
Real Java gotchas from interviews, each one a short program that does not do what it seems to.
Java · Java Interview Questions
#gotchas#interview
10 questions · ~8 min
Not started
Start
4
Static vs Instance
Medium
Know what belongs to the class and what belongs to each object, a favorite Java interview topic.
Java · Java Interview Questions
#oop#interview
10 questions · ~6 min
Not started
Start
5
Java: Find the Bug
Hard
Spot the bug in short Java programs that compile fine but do the wrong thing.
Java · Java Interview Questions
#debugging#interview
10 questions · ~8 min
Not started
Start
No quiz matches. Try another word or tag.
Popular this week
- 1 Type Casting MediumJava Basics#casting#types
- 2 static & final MediumObject-Oriented Java#oop#static
- 3 Inheritance & Polymorphism MediumObject-Oriented Java#oop#inheritance#polymorphism
- 4 Abstract Classes & Interfaces MediumObject-Oriented Java#oop#interfaces#abstract-classes
- 5 String Pool & Immutability MediumStrings, Arrays & Wrappers#strings#interview