Java Interview Questions To Ask

Java Interview Questions

What is the difference between a JDK and a JVM?
What is the difference between an Abstract Class and an Interface in Java?
What is the purpose of garbage collection in Java?
What are the main features of Java?
What is the purpose of the ‘static’ keyword in Java?
What is the difference between a constructor and a method?
How do you prevent a method from being overridden in Java?
What is the difference between a static and a non-static method?
How do you create an immutable class in Java?
What is the purpose of the final keyword in Java?
What is the difference between a String, a StringBuffer and a StringBuilder?
What is an exception in Java?
What is the difference between an exception and an error in Java?
How do you handle exceptions in Java?
What is the difference between a checked and an unchecked exception in Java?
What is the difference between a for loop and a while loop in Java?
What is the difference between a thread and a process in Java?
What is the purpose of the synchronized keyword in Java?
What is the purpose of the volatile keyword in Java?
What is the purpose of the transient keyword in Java?
What is the purpose of the finalize() method in Java?
What is the difference between a break and a continue statement in Java?
What is the difference between an Array and an ArrayList in Java?
What is the purpose of the Comparable interface in Java?
What is the purpose of the Comparator interface in Java?
What is the purpose of the Iterator interface in Java?
What is the purpose of the ListIterator interface in Java?
What is the difference between a HashMap and a Hashtable in Java?
What is the purpose of the Serializable interface in Java?
What is the purpose of the Cloneable interface in Java?
What is the purpose of the equals() and hashCode() methods in Java?
What is the difference between a shallow copy and a deep copy in Java?
What is the purpose of the wait() and notify() methods in Java?
What is the difference between a static inner class and a non-static inner class in Java?
What is the purpose of the package keyword in Java?
What is the difference between a static import and a normal import in Java?
What is the purpose of the @Override annotation in Java?
What is the purpose of the @Deprecated annotation in Java?
What is the difference between a Path and a File in Java?
What is the difference between a Reader and an InputStream in Java?
What is the purpose of the try-with-resources statement in Java?
What is the purpose of the Atomic classes in Java?
What is the purpose of the ExecutorService in Java?
What is the purpose of the Fork/Join Framework in Java?
What is the purpose of the java.util.stream package in Java?
What is the purpose of the java.util.function package in Java?
What is the purpose of the java.time package in Java?
What is the purpose of the java.nio package in Java?
What is the purpose of the java.sql package in Java?
What is the purpose of the java.security package in Java?
What is the purpose of the java.net package in Java?
What is the purpose of the java.awt package in Java?
What is the purpose of the java.applet package in Java?
What is the purpose of the java.beans package in Java?
What is the purpose of the java.rmi package in Java?
What is the purpose of the java.xml package in Java?
What is the purpose of the java.management package in Java?
What is the purpose of the java.jmx package in Java?
What is the purpose of the java.text package in Java?
What is the purpose of the java.util.logging package in Java?