Java Interview Questions
Java Interview Questions
BASIC:
1. What is java?
2. What is the difference between platform dependent and independent?
3. Difference between java compiler and C Compiler?
4. Difference between JDK,JRE and JVM
5. Tokens and its types
6. Types of data types
7. Variables and its types?
8. Types of variables based on its scope/Visibility.
9. Characteristics of local, static and non-static variable?
10. What is method?
11. Types of method based on the formal arguments?
12. Difference between formal argument and actual argument.
13. How can you call the method?
14. What is method call statement
15. Different types of decision statement
16. What are the data types that are not allowed in a switch case?
17. How the switch case will work?
18. What is the difference between break and switch?
19. Different type of loop statement.
20. Difference between while loop and do-while loop?
21. How can we make for loop an infinite loop?
OOPs CONCEPTS:
OBJECT CLASS:
STRING:
EXCEPTION:
1. What is an exception?
2. Difference between checked exceptions and unchecked exception?
3. How can you handle the exception?
4. When can we tell exception is handled?
5. What is exception object propagation?
6. What is the difference between throws and throw?
7. What is the purpose of finally block?
WRAPPER CLASS:
1. What is boxing?
2. What is unboxing?
3. What is the purpose of valueOf();
4. What is autoboxing and auto unboxing?
COLLECTION:
1. What is a collection?
2. What is the difference between a collection and an array?
3. Difference between Comparable and Comparator interface.
4. Difference between ArrayList and LinkedList
5. Difference between iterator and listIterator
6. Difference between List and Set.
7. Difference between ArrayList and Vector.
8. What is a set and its characteristics?
9. What is the difference between TreeSet and HashSet?
10. Difference between LinkedHashSet and LinkedList?
11. What is the difference between HashMap and HashTable?