- Free Online Java Test Quiz, OCAJP OCPJP Mock Exams
- Java Language Basics
- Flow Control & Exception
- Object Oriented Programming
- Declaration Initialization and Access Control
- Java Language Basics
- Multithreading
- Java API
- Object Oriented Programming
- Flow control and exception handling
- Java Collections & Generics
- Declaration, Initialization, Access Control
- Java Online Test
- Programming test includes:
- Java — 20 Questions
- Custom Branding
- Branded PDF Report
- Sample Java Test Question
- Java Interview Questions
- F.A.Q.
- 1. Does every candidate have to answer the same questions?
- 2. How should I interpret the exam scores?
- 3. Coding Test vs. Quiz
- 4. What skill level is the test for?
- 5. What about junior and senior level developers?
- Java Quiz
- Count Your Score
- Start the Quiz
- Kickstart your career
- COLOR PICKER
- Report Error
- Thank You For Helping Us!
Free Online Java Test Quiz, OCAJP OCPJP Mock Exams
Online Java Test Quiz. Take the FREE Java programming test and SCJP OCPJP OCAJP mock exams. Each mock exam contains multiple Java quiz questions to cover important Java concepts. Quiz results will be displayed along with your score, average score, and quiz question answers.
Click on any of the below given links to start the mock exam online.
Java Language Basics
- Java Language Basics Quiz – 1 (10 Questions)
- Java Language Basics Quiz – 2 (10 Questions)
- Java Language Basics Quiz – 3 (10 Questions)
- Java Language Basics Quiz – 4 (10 Questions)
- Java Language Basics Quiz – 5 (10 Questions)
- Java Language Basics Quiz – 6 (10 Questions)
- Java Operators Quiz – 1 (10 Questions)
- Java Operators Quiz – 2 (10 Questions)
- Java Operators Quiz – 3 (12 Questions)
Flow Control & Exception
- If Else Quiz (10 Questions)
- Assertion Quiz (10 Easy Questions)
- Assertion Quiz (15 Medium/Hard Questions)
- Switch Quiz (12 Questions)
- While, Do While Loop Quiz (20 Questions)
- For Loop Quiz (20 Questions)
- Exception Handling Quiz – 1 (10 Questions)
- Exception Handling Quiz – 2 (10 Questions)
- Exception Handling Quiz – 3 (10 Questions)
Object Oriented Programming
- Java Object Oriented Programming Quiz – 1 (10 Questions)
- Java Object Oriented Programming Quiz – 2 (10 Questions)
- Java Object Oriented Programming Quiz – 3 (10 Questions)
- Java Object Oriented Programming Quiz – 4 (10 Questions)
- Java Object Oriented Programming Quiz – 5 (10 Questions)
- Java Object Oriented Programming Quiz – 6 (10 Questions)
- Java Object Oriented Programming Quiz – 7 (10 Questions)
- Java Object Oriented Programming Quiz – 8 (10 Questions)
- Java Object Oriented Programming Quiz – 9 (10 Questions)
- Java Object Oriented Programming Quiz – 10 (10 Questions)
Declaration Initialization and Access Control
- Java Declaration Initialization and Access Control Quiz – 1 (10 Questions)
- Java Declaration Initialization and Access Control Quiz – 2 (10 Questions)
- Java Declaration Initialization and Access Control Quiz – 3 (10 Questions)
- Java Declaration Initialization and Access Control Quiz – 4 (10 Questions)
- Java Declaration Initialization and Access Control Quiz – 5 (10 Questions)
- Java Declaration Initialization and Access Control Quiz – 6 (10 Questions)
- Java Declaration Initialization and Access Control Quiz – 7 (10 Questions)
- Java Declaration Initialization and Access Control Quiz – 8 (10 Questions)
- Java Declaration Initialization and Access Control Quiz – 9 (10 Questions)
- Java Declaration Initialization and Access Control Quiz – 10 (10 Questions)
Java test contains quiz questions from below given test objectives.
Java Language Basics
- Java package declaration and uses
- Using appropriate access modifiers
- Using import statements to import various packages and classes
- Using command line arguments to run the program and accessing arguments in the code
- Passing objects and primitive values in the methods as parameters
- Understanding how Java garbage collection works along with the behavior of the finalize method of the Object class
- Understanding and setting classpath to refer classes in the program
- Using and creating jar files
- Using various operators like assignment operators, arithmetic operators, instanceof operator, logical and conditional operators
Multithreading
- Creating threads using Thread class and Runnable interface
- Understanding thread states
- Understanding thread locking
- Using wait, notify and notifyAll methods
Java API
- Using wrapper classes
- Understanding autoboxing and unboxing
- Using String, StringBuffer, and StringBuilder classes
- Understanding and using serialization
- Using java.text package to format date, time and numbers
- Using java.util.regex package, using Pattern and Matcher classes
- Understanding the usage of java.io package
Object Oriented Programming
- Creating and using classes and objects
- Understanding inheritance and using interfaces
- Understanding encapsulation and polymorphism (compile time vs runtime)
- Overriding and overloading methods
- Using overloaded constructors, instance variables and static variables, static methods
- Using abstract classes and methods
- Using super and this keywords
Flow control and exception handling
- Understand and use the switch statement
- Understand usage of if, else if and else statements
- Use loops like while loop, for loop, enhanced for loop
- Use labels, break and continue statements
- Understand and use assertions
- Understanding and using checked and unchecked exceptions
- Handling runtime errors
- Understanding usage of throw, throws, catch and finally
- Creating and using custom exceptions
Java Collections & Generics
- Determine when to use which collection
- Using equals and hashCode methods
- Using collections like Set, List, and Map
- Sorting and searching collections
- Usage of type parameters in the class declaration, instance, and local variables and return types
Declaration, Initialization, Access Control
- Declaring classes, interfaces, nested classes and enums
- Declare and use static variables and methods
- Declaring and using default constructor as well as parameterized constructors
- Declaring and initializing primitive variables, arrays, and objects
- Declaring instance and local variables
Java Online Test
With this Java test, you can assess the skills of prospective candidates before ever inviting them to an interview.
The exam consists of 20 questions compiled by a group of experts in the Java programming language and covers a broad spectrum of Java knowledge. You can use our Java online test to easily identify which candidates show the highest aptitude for Java development and which you can safely pass on.
Taking advantage of Java quiz is a surefire way to streamline your interview process!
Programming test includes:
Java — 20 Questions
- Object-Oriented Programming (OOP)
- Data Structures and Algorithms
- References
- Generics
- Miscellaneous: Java Basics, Garbage Collection, Threading, Exceptions
Custom Branding
Do you want the Java coding test to match your own branding?
No problem! Use your company’s domain and logo without any mention of Tests4Geeks.
Your applicants will think these programming assessment tests are all yours!
«They totally blow away the competition as far as a better product value.»
Maurice H. on Capterra.com
Branded PDF Report
Are you recruitment firm? Send your clients branded reports of your candidates.
You’ll make a great impression!
Reports are provided in PDF format, making them easy to read, share and print.
Sample Java Test Question
Which of the following Java classes effectively prevent other classes from modifying their internal data? (Check all that apply.)
Note that for the purposes of this question, neither reflection nor bytecode manipulation may be used to modify another class.
The correct answers are 4 and 5.
Immutability is tricky in Java. To achieve it, you must:
- Not expose any mutators (setters)
- Protect your Java class from being subclassed
- Make sure all mutable data you expose is either immutable or a defensive copy
Java Interview Questions
So you’ve got candidates who have passed our online test – great!
Now it’s time to invite them to a live interview so you can personally ask some programming questions.
Our team of experts has assembled a set of ready-made Java interview questions and answers you can use in your interview process. We provide all the information you need to interview candidates like a professional developer!
F.A.Q.
1. Does every candidate have to answer the same questions?
Yes. Java test consists of the same questions for every candidate.
In order to properly compare candidates, they need to answer questions of the same difficulty level, and different questions always mean different difficulty levels.
However, the order of questions and answers is randomized for each applicant.
2. How should I interpret the exam scores?
First of all, you need to keep in mind one very important thing:
The purpose of this Java online test is not to help you find the best developers.
Its purpose is to help you avoid the worst ones.
For example, you have 5 candidates who get scores of 35, 45, 60, 65, and 80, based on a maximum possible score of 100.
We would recommend you invite the last three (those scoring 60, 65, and 80) to a live interview, not just the one who scored an 80/100.
3. Coding Test vs. Quiz
The test is presented in a multiple-choice, or quiz, format, rather than requiring test takers to write code.
If we used a coding test instead, we would have to check all answers manually, which would obviously be impossible.
4. What skill level is the test for?
The test is primarily created for mid-level developers.
5. What about junior and senior level developers?
The test can also be used to test junior programmers, but you should reduce your acceptance score drastically to compensate.
Likewise, you can use it to test senior Java developers as well, with an increased acceptance score.
Some will argue that it’s pointless to judge senior developers based on a test meant for mid-level developers. This is generally true if you’re looking for specific skills in a candidate rather than a broad base of expertise.
But at the same time, anyone can claim to be a senior developer on their resume. If you’re concerned that candidates might be overstating their knowledge and accomplishments, this Java skills test is a good way to determine which ones can actually deliver what they promise.
Java Quiz
The test contains 25 questions and there is no time limit.
The test is not official, it’s just a nice way to see how much you know, or don’t know, about Java.
Count Your Score
You will get 1 point for each correct answer. At the end of the Quiz, your total score will be displayed. Maximum score is 25 points.
Start the Quiz
If you don’t know Java, we suggest that you read our Java Tutorial from scratch.
Kickstart your career
Get certified by completing the course
COLOR PICKER
Report Error
If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail:
Thank You For Helping Us!
Your message has been sent to W3Schools.
Top Tutorials
Top References
Top Examples
Get Certified
W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.