Free Java Online Test and Interview Questions
Check your Java Core knowledge in two ways: take a timed test and get a score, or work through interview questions with answers at your own pace. Pick the topics, choose 5 to 100 questions — no registration needed.
Java online test
Multiple-choice questions on the topics you select. At the end you see your result as a percentage, every question, your answer and the correct one.
Java interview questions with answers
Typical interview questions by topic. Read a question, answer it in your head, then reveal the answer — a fast way to revise a module before an interview or an exam.
How it works
- Choose topics. Select one lesson, a whole module or several modules of the Java Core course.
- Set the length. From 5 to 100 questions; a typical test takes 10–30 minutes.
- Test questions are practical. Many show a code fragment: decide whether it compiles, what it prints, find the error or fill in the missing part.
- Review the result. After the test you get a score and a full review with the correct answers. Interview questions show the answer right away.
What the tests and questions cover
739 test questions and 559 interview questions across 16 modules. Open a module to see its lessons; a lesson link opens its interview questions.
What Is Java? Introduction to Java Programming
How to Create and Run Your First Java Application
- How to Write Your First Java Application
- Compile and Run Java Applications from the Command Line – Step-by-Step
- Understanding Java Packages: A Comprehensive Guide with Examples
- Java Compilation: -sourcepath and -classpath Explained
- How to Create and Use JAR Files in Java
- Command-Line Arguments in Java: How to Use Them
Java Syntax Basics: Variables, Identifiers, and Structure
- Java Language Lexicon: Whitespace, Identifiers, Keywords & Comments
- Best Practices for Naming Java Identifiers: Classes, Methods, Constants & Packages
- Primitive Types and Literals in Java
- Java Methods: Syntax, Parameters, Return Types, and Best Practices
- Java Variables: Declaration, Initialization and Scope
- Sign-Magnitude, One's Complement and Two's Complement
- Primitive Type Conversion in Java: Implicit and Explicit Type Casting
- Java User Input: Reading Data from Keyboard with System.in and Scanner
Basic Operations in Java: Arithmetic and Logical
- Learn Java Arithmetic Operators and Compound Assignment with Examples
- Understanding Java Increment and Decrement Operators
- Understanding Java Comparison Operators: Equal, Greater, Less and More
- Logical Operators in Java
- Ternary Operator in Java – How It Works and When to Use It
- The Assignment Operator (=) in Java
- Java Operator Precedence Table and Examples
- Java String Concatenation: Rules, Examples, and Unicode Encoding
- Bitwise and Bit Shift Operators in Java
Control Flow in Java: if, switch and Loops
Arrays in Java: How to Create and Use Them
Object-Oriented Programming in Java (OOP Concepts)
- Procedural vs Object-Oriented Programming
- Object-Oriented Programming (OOP) Concepts in Java
- Classes and Objects in Java
- Java Constructor Types: Default and Parameterized
- The this Keyword in Java
- Method and Constructor Overloading in Java
- Java Memory Structure: Stack and Heap
- Passing Objects to Methods in Java
- Java Varargs: Methods with Variable-Length Arguments
- Recursion in Java Explained
- Garbage Collection
- Java Inheritance and the extends Keyword
- The super Keyword in Java
- Access Modifiers in Java
- JavaBeans Naming Conventions: Getters, Setters and boolean is
- Method Overloading vs Overriding in Java
- Abstract Classes and Methods in Java
- The final Keyword in Java
- The native Keyword in Java
The static Keyword in Java
Object Class Methods: equals, hashCode, toString
Interfaces and Enums in Java
Wrappers
Lambda Expressions in Java: Syntax and Examples
Java Stream API: Complete Guide with Examples
Sorting Algorithms in Java: Basics and Examples
Inner Classes and Exceptions
Git and GitHub for Beginners: Version Control Basics
Frequently Asked Questions
Is the Java online test free?
Yes. Both the Java online test and the interview questions are free and work without registration. If you sign in, your test results are saved to your profile.
What is the difference between the test and the interview questions?
The test checks you: you answer multiple-choice questions and get a score with a review of the correct answers at the end. The interview questions help you revise: you read a question, answer it yourself and reveal the answer right away, without a score.
How many questions are there?
The Java Core course has 739 test questions and 559 interview questions across 16 modules. In one session you choose the topics and take from 5 to 100 questions.
What Java topics are covered?
The questions follow the Java Core course: what Java is and your first program, syntax and data types, operators and control flow, arrays, OOP, the static keyword, the Object class, interfaces and enums, wrapper classes, lambdas, the Stream API, sorting algorithms, inner classes and exceptions, and Git. The full list of modules and lessons is on this page.
Is it suitable for beginners or experienced developers?
Both. Beginners can test one lesson right after studying it, while experienced developers can pick several modules to find gaps before an interview. Since you choose the topics yourself, the test is as easy or as hard as the modules you select.
Will I see the correct answers?
Yes. After the test you see every question, your answer and the correct answer, so you know exactly which topics to review. Interview questions show the answer as soon as you open it.
Can it help me prepare for a Java assessment test at work?
It covers the Java Core topics that most technical assessments and interviews check, with code-based questions on compilation, output and errors. Use the test to find weak topics and the interview questions to revise them.