1. What is the default value of an uninitialized integer variable in Java?
Explanation: Uninitialized integer variables in Java are assigned a default value of 0.
Report for correction2. Which operator is used for performing division in Java?
Explanation: The / operator is used for performing division in Java.
Report for correction3. What is an interface in Java?
Explanation: An interface in Java defines a blueprint for a class, specifying the methods it must implement.
Report for correction4. What is Java?
Explanation: Java is a widely-used programming language for developing various types of software applications.
Report for correction5. What is the result of adding an integer and a floating-point number in Java?
Explanation: When you add an integer and a floating-point number in Java, the result is a floating-point number.
Report for correction6. What is the Java keyword for defining a constant?
Explanation: The final keyword is used in Java to define constants.
Report for correction7. Which loop is used for iterating a block of code a specific number of times in Java?
Explanation: The for loop is used for iterating a block of code a specific number of times in Java.
Report for correction8. What is the entry point for a Java application?
Explanation: The main method is the entry point for a Java application.
Report for correction9. Which Java class is used for writing text to a file?
Explanation: The FileWriter class is used for writing text to a file in Java.
Report for correction10. What is the Java keyword used for creating a new instance of a class?
Explanation: The new keyword is used to create a new instance of a class in Java.
Report for correction11. Which keyword is used to declare a class in Java?
Explanation: The class keyword is used to declare a class in Java.
Report for correction12. In Java, which data type is used to store a single character?
Explanation: The char data type is used to store a single character in Java.
Report for correction13. What does JVM stand for in the context of Java programming?
Explanation: JVM stands for Java Virtual Machine, which is responsible for executing Java bytecode.
Report for correction14. Which Java class is used for reading input from the keyboard?
Explanation: The Scanner class is commonly used for reading input from the keyboard in Java.
Report for correction15. What is bytecode in Java?
Explanation: Bytecode is an intermediate code that is executed by the Java Virtual Machine (JVM).
Report for correction16. Which data structure is used to store elements in a specific order in Java?
Explanation: A List is a data structure used to store elements in a specific order in Java.
Report for correction17. What is the correct way to declare a method in Java?
Explanation: In Java, methods are declared with a method name followed by parentheses and curly braces for the method body.
Report for correction18. Which of the following is not a feature of Java?
Explanation: Java uses static typing, where variable types are known at compile time.
Report for correction19. Which access modifier allows a variable or method to be accessible within the same class only?
Explanation: The private access modifier restricts access to the same class only.
Report for correction20. Who created the Java programming language?
Explanation: James Gosling, along with his team at Sun Microsystems, developed the Java programming language.
Report for correction21. What is the purpose of the System.out.println() statement in Java?
Explanation: The System.out.println() statement is used to print text or values to the console in Java.
Report for correction22. What is the purpose of the try-catch block in Java?
Explanation: The try-catch block is used to handle exceptions and errors in Java.
Report for correction23. In Java, what is the purpose of the break statement?
Explanation: The break statement is used to exit a loop or switch statement prematurely.
Report for correction24. What is the purpose of the this keyword in Java?
Explanation: The this keyword is used to refer to the current instance of a class in Java.
Report for correction25. What is the correct syntax for declaring a variable in Java?
Explanation: In Java, variables are declared with the data type followed by the variable name.
Report for correction