Here is the top and best Java interview questions that are frequently ask in any interview you must prepare. The list is useful for freshers and experienced people for java interview preparation. Please comment your answer to this post.
Keywords – Java interview questions and answers for experienced, java interview questions and answers for 3 years experience, java interview questions and answers for freshers, advanced java interview questions, java interview questions for 5 years experience, java interview programs, java collection interview questions
Java Interview Questions
What is the name of the class that is super class for every class?
Is it possible to extend the java.lang.String class?
What is the difference between a static and non-static method?
What is the purpose of garbage collection in java?
How many public classes are permitted within a single java class file?
What is the command line utility used to compile java source code into bytecode?
Why is the main() method always declared as a static method?
How are constants declared in java?
What is an object wrapper?
How are command line arguments passed in java?
What are the important principles of object oriented concepts?
Explain the principle of encapsulation?
Explain polymorphism principle?
What are the different forms of polymorphism in java?
What feature of java support multiple inheritance?
What is the difference between getClass() and instanceOf in java?
Is it possible for an anonymous class to be defined to implement an interface or extend a class?
What is the difference between == operator and equals () method?
What is the purpose of finalize () method?
In a try-catch-finally statement what is the use of finally clause?
What does a default member mean?
If a class contains more than one or more final methods must the class be declared final?
What is the difference between String class and StringBuffer class?
What does Java Sandbox term mean?
What is a Thread?
What are the two approaches for writing code that create a new Thread of control?
What method is used to start the execution of the thread?
What is the purpose of synchronized keyword?
What is collection?
What is an Iterator?
Difference between hash map and hash table?
What is serialization?
Difference between swing and AWT?
What is the difference between ServerSocket and DatagramSocket transport protocol?
What are checked and unchecked Exception?