[Go to site: main page, start]

0% found this document useful (0 votes)
8 views2 pages

Java Interview Questions

The document contains a comprehensive list of Java interview questions covering core Java concepts, Java collections, and data structures and algorithms (DSA). Key topics include differences between JDK, JRE, and JVM, features of Java, OOP principles, exception handling, and various collection types. It also includes practical coding questions and explanations of time complexity for common operations.

Uploaded by

KARTHIKEYA J.S.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Java Interview Questions

The document contains a comprehensive list of Java interview questions covering core Java concepts, Java collections, and data structures and algorithms (DSA). Key topics include differences between JDK, JRE, and JVM, features of Java, OOP principles, exception handling, and various collection types. It also includes practical coding questions and explanations of time complexity for common operations.

Uploaded by

KARTHIKEYA J.S.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Java Interview Questions

CORE JAVA

1. What is the difference between JDK, JRE, and JVM?

2. What are the main features of Java?

3. Explain the difference between == and .equals() in Java.

4. What is the difference between String, StringBuilder, and StringBuffer?

5. What are the four pillars of OOP? Explain each.

6. What is the difference between abstract class and interface?

7. What is method overloading and method overriding?

8. What is the difference between final, finally, and finalize()?

9. What is Exception Handling? Explain checked vs unchecked exceptions, try-catch-finally, throw


vs throws.

10. What is Multithreading in Java? Explain thread lifecycle, Runnable vs Thread, synchronization.

JAVA COLLECTIONS

11. What is the Java Collection Framework?

12. Difference between List, Set, and Map.

13. Difference between ArrayList and LinkedList.

14. Difference between HashSet, LinkedHashSet, and TreeSet.

15. Difference between HashMap, LinkedHashMap, and TreeMap.

16. How does HashMap work internally?

17. Difference between Comparable and Comparator.

18. What is fail-fast and fail-safe iterator?

JAVA DSA

19. Reverse a String in Java (multiple approaches).


20. Find the second largest element in an array.

21. Check if a string is palindrome.

22. Find frequency of each character in a string.

23. Difference between Stack and Queue. Implement using Java collections.

24. Explain time complexity of ArrayList add(), LinkedList add(), HashMap get(), Binary Search.

25. Write a program to detect cycle in a linked list (Floyd’s Algorithm).

You might also like