Java Online Test
For jobseekers
Practice your skills and earn a certificate of achievement when you score in the top 25%.
Take a Practice TestFor companies
Screen real Java skills, flag human or AI assistance, and interview the right people.
About the test
The Java online test assesses knowledge of programming in the Java language and commonly used parts of the Java Class Library. This test requires solving live coding problems in Java.
The assessment includes work-sample tasks such as:
- Working with classes, objects, and interfaces to write reusable code.
- Using proper algorithms and data structures to optimize application performance.
- Taking advantage of the Java Class Library.
A good Java developer needs a solid understanding of the Java programming language as well as the Java Class Library and its functionality to write robust and maintainable code.
Sample public questions
Refactor the AlertService and MapAlertDAO classes:
- Create a new package-private interface, named AlertDAO, that contains the same methods as MapAlertDAO.
- MapAlertDAO should implement the AlertDAO interface.
- AlertService should have a public constructor that accepts AlertDAO.
- The raiseAlert and getAlertTime methods should use the object passed through the constructor.
A gaming company is working on a platformer game. They need a method that will compute the character's final speed, given a map and a starting speed.
The terrain on which the game character moves forward is made from various pieces of land placed together. Implement the method calculateFinalSpeed which takes the initial speed of the character, and an array of degrees of inclination that represent the uneven terrain.
The speed of the character will increase or decrease proportionally to the incline of the land, as shown in the image below:

The magnitude of the angle of inclination will always be < 90°. The speed change occurs only once for each piece of land. The method should immediately return 0 as the final speed if an incline reduces the speed to 0 or below 0, which makes the character lose 1 life.
For example, the below code:
System.out.println(calculateFinalSpeed(60.0, new int[] { 0, 30, 0, -45, 0 }));
should print:
75
For jobseekers: get certified
Earn a free certificate by achieving top 25% on the Java test with public questions.
Take a Certification TestSample silver certificate
Sunshine Caprio
Java and SQL TestDomeCertificate
For companies: premium questions
Buy TestDome to access premium questions that can't be practiced.
Ready to interview?
Use these and other questions from our library with our
Code Interview Platform.

86 more premium Java questions
Document Store, Driver Exam, Chain Link, Document Counter, Hobbies, Product, Snapshot, Snow Storm, Utilities, Weighted Average, Shining Star, Crop Ratio, Integer Utilities, Fire Dragon, Log Parser, String Occurrence, Worker, Segment, Shelf Test, Read Write Execute, Read First Line, Max Sum, Unique Numbers, Friend, Stories, Moving Total, Internal Nodes, Veterinarian, Wheel Defects, Paper Strip, Flight Connections, Language Teacher, Vectors, Racer, Mock Library, Patient Class, Reward Points, Tax Calculator, Test Results, Numbers To Text, Ceramic Store, Stack to List, Config Element, Tiles, New Folder, Paragraph, Animal Hierarchy, Procedural Generator, Action Stack, Node, Calories Burned, Kilometer Converter, Construction Game, Date Transform, Platformer, Company Stock, Chemical Machine, Adventure Game, Seasonal Tourism, Candies, Shipping, Speed Monitor, Parking Allocation, Planet Search, Special Actions, Ecological Experiment, Automated Forklift, Digital Flasks, Popular Book, Car Rental, Username, Flimsy Bridge, Unique Product, Book Sale, Circuit Simulator, Airport Networks, Jobs Time, Christmas Lights, Automated Warehouse, Price Trends, Fraud Detection, Movie Night, Weather Station, Mail Room, Pet Names, Log Stream Writer.
Skills and topics tested
- Java
- Bug Fixing
- Language
- Exceptions
- Linked List
- OOP
- Refactoring
- HashMap
- Iteration
- Lists
- Accessibility Levels
- ArrayList
- Class Modifiers
- Arithmetic
- TDD
- Integer Division
- Performance Tuning
- Higher Order Function
- Interfaces
- Serialization
- XML
- Stream
- Strings
- Memory Management
- Test Case Design
- Unit Testing
- Algorithmic Thinking
- Graphs
- Dynamic Programming
- HashSet
- Arrays
- Tree
- Queue
- StringBuilder
- Inheritance
- Multithreading
- Synchronization
- Dynamic Proxy Classes
- Abstract Class
- Classes
- Objects
- Stream API
- Complexity
- Stack
- Generics
- Regex
- Random
- Recursion
- Method Overriding
- Video
- Data Structures
- AI Code Review
- Conditional Statements
- Loops
- Conditions
- 2D Array
- Dictionary
- Sorting
For job roles
- Back-End Developer
- Java Developer
- Web Developer
Sample candidate report
Need it fast? AI-crafted tests for your job role
TestDome generates custom tests tailored to the specific skills you need for your job role.
Sign up now to try it out and see how AI can streamline your hiring process!
What others say
Simple, straight-forward technical testing
TestDome is simple, provides a reasonable (though not extensive) battery of tests to choose from, and doesn't take the candidate an inordinate amount of time. It also simulates working pressure with the time limits.
Jan Opperman, Grindrod Bank
Product reviews
Used by
Solve all your skill testing needs
150+ Pre-made tests
130+ skills
AI-ready assessments
How TestDome works
Choose a pre-made test
or create a custom test
Invite candidates via
email, URL, or your ATS
Candidates take
a test remotely
Sort candidates and
get individual reports







