30 random questions, 30 minutes, at the level you choose: core java, collections, concurrency, spring boot and jpa. After you submit you get your score, your strong and weak topics, and the right answer with an explanation for every question.
Want to revise first? Read the Java and Spring Boot interview questions and answers.
The test draws on 300 Java and Spring Boot questions in 12 topics, across three levels. Each attempt picks 30 of them at random for the level you choose.
One question from each level, the way they appear in the test. Try it, then open the answer.
String a = "hi";
String b = "h" + "i";
String c = new String("hi");
System.out.println((a == b) + " " + (a == c) + " " + a.equals(c)); Answer: true false true. "h" + "i" is a compile-time constant, so it is interned and shares the literal "hi" from the string pool. new String("hi") always creates a separate heap object, so == is false while equals() compares the characters and returns true.
static void show(long x) { System.out.println("long"); }
static void show(Integer x) { System.out.println("Integer"); }
static void show(Object x) { System.out.println("Object"); } Answer: long. Overload resolution first tries methods that need no boxing. Widening the int 5 to long is allowed in that phase, so show(long) wins before boxing to Integer or Object is even considered. This ordering can surprise you when APIs overload on both primitive and wrapper types.
Answer: Compare maps with equals(), or use a LinkedHashMap if the order is part of the contract. HashMap promises no iteration order, and it can change with capacity, hash function or JDK version. Tests that depend on it are flaky by design. Assert on content with map equality, or switch to LinkedHashMap or TreeMap where order is truly required by the feature.
Take the full Java and Spring Boot mock test: 30 questions, 30 minutes.
A question counts as right only when you pick exactly the right option, or all the right options where it says so; a question left blank counts as wrong. Your score is the share of the 30 questions you got right. The result also scores every topic, so you know what to revise before the interview.
Yes. The Java and Spring Boot mock test is free. You need a free CoreHRx Jobs account to start it, so your score and the topics to work on are saved.
Each test has 30 multiple-choice questions to answer in 30 minutes, picked at random from 300 Java and Spring Boot questions across three levels, so every attempt is different.
The questions cover Collections, Concurrency, Core Java, JPA, JVM, Microservices, OOP, REST APIs, Security, Spring Boot, Spring Core, Streams. Your result shows how you did in each topic.
Fresher if you are a student or have less than a year of experience, Intermediate for 1 to 5 years at work, and Experienced for 5 years or more.
Only your best Java and Spring Boot score, and only when it is 60% or more. It shows on the job applications you send on CoreHRx. Lower scores stay private.
Yes, up to 10 tests a day. Each attempt picks questions you have not seen recently first.