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