Author name: admin

What does JDK stand for?

Java MCQ: What does JDK stand for? a) Java Development Kit b) Java Debug Kit c) Java Data Kit d) Java Deployment Kit Answer: a) Java Development Kit Explanation: The Java Development Kit (JDK) is a software development environment used for developing Java applications. It includes the Java compiler, libraries, and tools needed to develop,

What does JDK stand for? Read More »

Which of the following best describes Java’s garbage collection mechanism?

Java MCQ: Which of the following best describes Java’s garbage collection mechanism? a) Java requires manual memory management by the programmer b) Java automatically reclaims memory occupied by unreachable objects c) Java uses pointers to manage memory d) Java does not have a memory management mechanism Answer: b) Java automatically reclaims memory occupied by unreachable

Which of the following best describes Java’s garbage collection mechanism? Read More »

Which of the following best describes the difference between JDK, JRE, and JVM?

Java MCQ: Which of the following best describes the difference between JDK, JRE, and JVM? a) JDK is a development environment, JRE is a runtime environment, and JVM is a virtual machine b) JDK is used to execute Java programs, JRE is used to develop Java programs, and JVM is used to debug Java programs

Which of the following best describes the difference between JDK, JRE, and JVM? Read More »

Which of the following is true about the ‘volatile’ keyword in Java?

Java MCQ: Which of the following is true about the ‘volatile’ keyword in Java? a) It ensures that a variable’s value is read from main memory, not from a thread’s local cache b) It prevents multiple threads from accessing a variable simultaneously c) It guarantees that a variable cannot be modified d) It is used

Which of the following is true about the ‘volatile’ keyword in Java? Read More »

Which of the following is not a feature of the Java programming language?

Java MCQ: Which of the following is not a feature of the Java programming language? a) Object-oriented b) Platform-independent c) Supports pointers d) Multithreaded Answer: c) Supports pointers Explanation: Java is an object-oriented, platform-independent, and multithreaded programming language, but it does not support pointers. Pointers are used in languages like C and C++ to directly

Which of the following is not a feature of the Java programming language? Read More »

What is the default value of an object reference declared as an instance variable in Java?

Java MCQ: What is the default value of an object reference declared as an instance variable in Java? a) 0 b) null c) undefined d) An object reference does not have a default value Answer: b) null Explanation: In Java, the default value of an object reference declared as an instance variable is null. This

What is the default value of an object reference declared as an instance variable in Java? Read More »

Scroll to Top