Question 41
What is the standard file extension of compiled Java bytecode files?
Option A is correct. Java source code (.java) is compiled by javac into platform-independent bytecode stored in .class files.
What is the standard file extension of compiled Java bytecode files?
Option A is correct. Java source code (.java) is compiled by javac into platform-independent bytecode stored in .class files.
What is the exact method signature of the entry point main method in a standalone Java application?
Option D is correct. JVM searches specifically for public static void main(String[] args) as the starting point for executing a standalone Java program.
What happens when an abstract class is declared in Java?
Option C is correct. An abstract class (declared with 'abstract') cannot be instantiated directly. It can contain both abstract methods and concrete implemented methods.
Which type of exception in Java requires mandatory handling (try-catch or throws clause) at compile time?
Option B is correct. Checked Exceptions (like IOException, SQLException) are checked by compiler. The program will fail to compile if they are neither caught nor declared in method signature.
Which tool in the JDK is used to generate HTML documentation directly from Java source code comments?
Option A is correct. javadoc parses doc comments (/** ... */) in Java source files and generates API documentation in HTML format.