Java Basics for Beginners

Review your understanding of Java syntax,data types,and control structures.

1. Which of the following is a primitive data type in Java?
2. Which access modifiers are available in Java?
3. Java is a case-sensitive language.
4. What symbol is used to denote a single-line comment in Java?
5. What is the correct signature for the main method in a Java program?
6. Which loop structures are supported in Java?
7. Primitive data types in Java can hold the value 'null'.
8. What keyword is used to create an instance of a class?
9. Which operator is used for logical AND in Java?
10. Which statements can exit a loop prematurely?
11. Method overloading allows multiple methods with the same name but different parameters.
12. What is the default value of an uninitialized boolean variable?
13. How do you correctly declare an array of integers in Java?
14. Which of the following are Java keywords?
15. Static members belong to the class, not individual instances.
16. What is the output of: System.out.println(3 + 4 * 2);
17. Which keyword is used to inherit a class in Java?
18. Which method returns the length of a String?
19. Java is a purely object-oriented programming language.
20. What does JVM stand for?
Answered 0 of 0 — 0 correct