Core Java Interview Questions
- What is static block?
- What is Constructor?
- What is Encapsulation?
- What is Collection API?
- What is an abstract class?
- What is transient variable?
- What are wrapped classes?
- What are Access Specifies?
- What is method overloading?
- Why Errors are Not Checked?
- What is the use of finally block?
- What are the uses of final method?
- Which is super class of Exception?
- What is main purpose of interface?
- Explain the user defined Exceptions?
- What do u mean constructor in java?
- What do u mean by “method” in java?
- why java uses singly rooted heirarchy?
- How can you force garbage collection?
- Can we create an object for an interface?
- What is the difference throw and throws?
- Can overloaded methods be override too?
- Is it possible to override the main method?
- What are the principle concepts of OOPS?
- How does Java implement polymorphism?
- Explain the usage of the keyword transient?
- Explain the significance of try-catch blocks?
- Why Runtime Exceptions are Not Checked?
- What are Access Specifies available in Java?
- What is a local, member and a class variable?
- What do you understand by Synchronization?
- Why operator overloading is not there in java?
- Can we have the try block without catch block?
- What are the different ways to handle exceptions?
- What is the difference between throw and throws?
- How does the Java default constructor be provided?
- Why threads block or enter to waiting state on I/O?
- How are this () and super () used with constructors?
- What is the difference between yield () and sleep ()?
- What are the advantages of using exception handling?
- How do you prevent a method from being overridden?
- What modifiers are allowed for methods in an Interface?
- What is difference between an Abstract class and Interface?
- What are the differences between Contructors and Methods?
- What is similarities between an Abstract class and Interface?
- Can there be an abstract class with no abstract methods in it?
- What is runtime polymorphism or dynamic method dispatch?
- What are the similarities between an array and an Array List?
- What is the difference between abstraction and encapsulation?
- What is the difference between static and non-static variables?
- How to invoke a super class version of an Overridden method?
- What are the differences between Interface and Abstract class?
- What is the initial state of a thread when it is created and started?
- Why would you use a synchronized block vs. synchronized method?
- What is the difference between time slicing and preemptive scheduling?
- What are the differences between method overloading and method overriding?
- When you declare a method as abstract, can other no abstract methods access it?
- What if there is a break or return statement in try block followed by finally block?
- How many ways to create Thread and which one is good? Runnable interface or Thread class?
- Can we declare an anonymous class as both extending a class and implementing an interface?