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 Core

Learn Java for free with 110 structured lessons, practice tests, Q&A cards and video tutorials. No registration needed. Start from zero — at your own pace.

21 Modules ⏱ 10–30 min
5 to 100 questions

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.

Java Core

Learn Java for free with 110 structured lessons, practice tests, Q&A cards and video tutorials. No registration needed. Start from zero — at your own pace.

20 Modules ⏱ 10–30 min
5 to 100 questions

Web Services

Learn Java Web Services for free — REST, SOAP, JAX-RS, JAX-WS, XML and more. 36 structured lessons with video and practice tasks. No registration needed.

15 Modules ⏱ 10–30 min
5 to 100 questions

Java Persistence API

Free Online Tutorial for learning Java Persistence API (JPA) and preparation to Oracle Exam Certification. One of the JPA implementations is Hibernate.

11 Modules ⏱ 10–30 min
5 to 100 questions

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 40 test · 32 interview
How to Create and Run Your First Java Application 40 test · 25 interview
Java Syntax Basics: Variables, Identifiers, and Structure 65 test · 32 interview
Basic Operations in Java: Arithmetic and Logical 47 test · 34 interview
Control Flow in Java: if, switch and Loops 53 test · 39 interview
Arrays in Java: How to Create and Use Them 40 test · 45 interview
Object-Oriented Programming in Java (OOP Concepts) 128 test · 100 interview
The static Keyword in Java 23 test · 23 interview
Object Class Methods: equals, hashCode, toString 18 test · 16 interview
Interfaces and Enums in Java 36 test · 25 interview
Wrappers 9 test · 5 interview
Lambda Expressions in Java: Syntax and Examples 89 test · 77 interview
Java Stream API: Complete Guide with Examples 36 test · 36 interview
Sorting Algorithms in Java: Basics and Examples 40 test · 40 interview
Inner Classes and Exceptions 66 test · 21 interview
Git and GitHub for Beginners: Version Control Basics 9 test · 9 interview

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.