Back to programming Quizzes

Core Java Quiz ( Intermediate )

This intermediate Core Java quiz is designed for developers who understand Java basics and want to strengthen applied concepts. It covers OOP principles, memory management, strings, collections, exception handling, multithreading basics, and commonly asked Java interview questions.

15
Questions
~10
Minutes
10
Min Limit

Try a few sample questions

The question bank contains 46 questions. Your scored round uses up to 15 different questions. These samples are excluded from your round; try each one before opening its answer and explanation.

1. What is the main difference between JDK and JRE?

  1. JDK runs programs, JRE compiles them
  2. JDK contains development tools, JRE only runs programs
  3. JRE is larger than JDK
  4. They are the same
Reveal sample answer and explanation

Answer: JDK contains development tools, JRE only runs programs

JDK includes compiler and tools, while JRE only runs Java programs.

2. What is the purpose of the JVM?

  1. Write Java code
  2. Compile Java code
  3. Execute bytecode on any platform
  4. Manage databases
Reveal sample answer and explanation

Answer: Execute bytecode on any platform

JVM executes bytecode and enables platform independence.

3. Why is Java called platform-independent?

  1. It runs only on Windows
  2. It uses C language internally
  3. Bytecode runs on JVM across platforms
  4. It does not need OS
Reveal sample answer and explanation

Answer: Bytecode runs on JVM across platforms

Java bytecode runs on JVM regardless of OS.