Core Java Interview Questions

Q) Why is java platform independent?
Q) Explain OOPS concepts? 
Q) Explain abstractions?
Q) Explain encapsulation?
Q) What is an instance of a class?
Q) Explain is-a vs has-a relationship?
Q) Explain inheritance and types of inheritance?
Q) Does java support multiple inheritances?
Q) Difference between abstract class vs Interface?
Q) Explain method overloading vs overriding OR compile time vs runtime polymorphism?
Q) Explain class loaders in java?
Q) Explain different ways of creating an object in java?


Q) Can super class reference variable holding subclass object?
Q) Can we overload the static method? 
Q) Can we override static method?
Q) Can we overload a private method? 
Q) Can we override a private method?
Q) Can we overload the final method? 
Q) Can we override the final method? 
Q) How to create immutable class and object in java?
Q) What are immutable classes?
Q) Difference between creating a String object with& without new keyword?
Q) Explain memory management in java?
Q) Explain Garbage Collector in Java? What is Xmx and Xms in java? What is parallel GC in java?
Q) Explain finalize keyword in java?
Q) Explain static keyword?
Q) Can we access non-static members from static method directly?
Q) Access Modifiers and its scopes?
Q) Explain try catch finally?
Q) When does finally block doesn't execute?
Q) Explain throw, throws keywords in java?
Q) Steps to implement buit in exceptions ?
Q) Explain caught vs uncaught exceptions? Runtime vs compile time exceptions? list few built-in compile and runtime exceptions?
Q) Explain dry principle in java?
Q) Explain generics in java?

Q) Explain about reflections?

Q) Explain JVM memory partition?

******************************************************
Q) How do you initialize Servlet Context And Servlet Config in Web.xml?
Q) What is the front controller for Spring framework ?
Q) Can you explain Spring MVC flow ?
Q) How does second level cache works in Hibernate ?
Q) Difference between get() and load() in Hibernate ?
Q) What is criteria query in Hibernate ?
Q) What is the Annonation for one-to-many mappings?
Q) What are stero type annontaions?
Q) What are the ways to load a property file in Spring?
Q) Explain @Autowired Annotaion?
Q) Difference between @Bean vs @Autowired annotation?
Q) When do you need a qualifier ?
Q) Can you explain how to do Spring and Hibernate Integration ?
******************************************************
Q) Command to run spring boot application
Q) What are the steps involved in launching aws ec2 instance ?
Q) What is .pem key file in AWS ?
Q) How does AWS resolve DNS names ?
Q) Explain AUTO Scaling group ?
Q) Explain about ELB ?

Leave a Reply

Your email address will not be published. Required fields are marked *