Top 20 Basic Java and OOP Questions
1. What is Java?
2. What are the features of Java?
3. What is the JVM, JRE, and JDK?
4. What is the difference between a class and an object?
5. What is the entry point of a Java program?
6. What is a variable? What are the different types of variables in Java?
7. What are data types in Java?
8. What is the difference between = and ==?
9. What is an if statement? Give an example.
10. What is the syntax of an if-else statement?
11. What is the difference between if-else and else-if ladder?
12. What is a nested if statement?
13. What is a loop in Java? Why do we use loops?
14. What is a for loop? Give an example.
15. What is the difference between while and do-while loop?
16. What are break and continue statements?
17. What are the four basic principles of Object-Oriented Programming (OOP)?
18. What is a class in Java?
19. What is an object in Java?
20. What is inheritance in Java?