Topic / 35 questions

Java MCQs

Java MCQs test your knowledge of the Java programming language, including the JVM, data types, operators, control statements, arrays and object-oriented ideas. They help computer science students and IT job applicants, and every question shows its correct answer instantly so you can check concepts as you practise.

Advertisement
Advertisement
Question 13 Java

What is the full form of JVM?

Correct answer D. Java Virtual Machine

Open question
Advertisement

About Java MCQs

This topic covers core Java that interviewers and written tests often check. Questions ask which component provides the runtime environment for bytecode, which is the Java Virtual Machine, and which operator allocates memory to arrays, the new operator. You will also meet instance variables created with each object, jump statements such as break, continue and return, and exception handling with try, catch and finally. Operator precedence items, including how division and multiplication share equal precedence, also appear. These basics are useful for software house tests, computer lecturer posts and placement rounds.

Exams that include Java MCQs

Pakistan

  • NTS
  • PPSC
  • FPSC
  • Lecturer tests

India

  • Campus placements
  • UGC NET
  • SSC CGL

Bangladesh

  • Government job tests
  • Bank job exams
  • BCS

Frequently asked questions

What is the difference between JDK, JRE and JVM?

The JVM, or Java Virtual Machine, runs Java bytecode. The JRE, or Java Runtime Environment, contains the JVM plus the libraries needed to run Java programs. The JDK, or Java Development Kit, includes the JRE along with development tools such as the compiler javac, so it is needed to write and compile programs.

Which operator is used to allocate memory to an array in Java?

The new operator is used to allocate memory to an array in Java, for example int[] marks = new int[10];. It creates the array object on the heap and initialises numeric elements to zero. The same operator is used to create objects from classes.

Last reviewed October 2026