Skip to main content Link Search Menu Expand Document (external link)

JAVA

JAVA Questions To BE Asked

  1. What is the difference between JDK, JRE, and JVM?
  2. Explain the main principles of Object-Oriented Programming (OOP).
  3. What is the difference between an abstract class and an interface? When would you use each?
  4. What are constructors in Java? Explain different types of constructors.
  5. What is method overloading and method overriding? Provide examples.
  6. Explain the difference between checked and unchecked exceptions in Java.
  7. What is the significance of the “static” keyword in Java? How is it used?
  8. What is the difference between “==” and “.equals()” method in Java? When would you use each?
  9. Describe the difference between ArrayList and LinkedList in Java.
  10. What is the difference between final, finally, and finalize in Java?
  11. Explain the concept of multithreading in Java and how it is achieved.
  12. What is synchronization in Java? How do you achieve synchronization?
  13. Describe the difference between composition and inheritance in Java.
  14. How does garbage collection work in Java? What are its advantages and disadvantages?
  15. Explain the concept of method chaining in Java.
  16. What is a lambda expression in Java? Provide an example of its usage.
  17. What is the difference between “public”, “private”, “protected”, and “default” access modifiers in Java?
  18. How does Java handle platform independence?
  19. Explain the difference between the “final”, “finally”, and “finalize” keywords in Java.
  20. Describe the difference between static and dynamic binding in Java.

ADVANCE_JAVA

  1. What is the difference between Serializable and Externalizable interfaces in Java?
  2. Explain the concept of JDBC (Java Database Connectivity) and its key components.
  3. What are the advantages of using PreparedStatement over Statement in JDBC?
  4. Describe the purpose and usage of Java Naming and Directory Interface (JNDI).
  5. What is the role of Java Transaction API (JTA) in managing transactions in Java EE applications?
  6. Explain the difference between stateful and stateless session beans in EJB (Enterprise JavaBeans).
  7. How does Java Message Service (JMS) facilitate asynchronous communication between Java EE components?
  8. Describe the use of annotations in Java, particularly in the context of frameworks like Spring.
  9. What is Aspect-Oriented Programming (AOP) and how is it implemented in Java?
  10. Explain the concept of inversion of control (IoC) and dependency injection in the context of Spring framework.
  11. Describe the purpose and usage of Java Management Extensions (JMX) in monitoring and managing Java applications.
  12. What are the different types of servlet listeners in Java EE and how are they used?
  13. Explain the concept of servlet filters and provide examples of common use cases.
  14. Describe the architectural components of a JavaServer Faces (JSF) application.
  15. What is Hibernate ORM (Object-Relational Mapping) and how does it simplify database interaction in Java applications?
  16. Explain the difference between FetchType.LAZY and FetchType.EAGER in Hibernate.
  17. Describe the purpose and usage of Java Persistence API (JPA) in Java EE applications.
  18. What is Spring Boot and how does it simplify the development of Java applications?
  19. Explain the concept of microservices architecture and discuss how it can be implemented using Spring Cloud.
  20. Describe the use of Java Authentication and Authorization Service (JAAS) in securing Java applications.