fbpx
1800 274 6001 sara@netconnectglobal.com

Java interview questions for 3 to 5 years of experience

Estimated reading: 1 minute 221 views
  • OOPs – Explain core OOPs concepts like abstraction, encapsulation, inheritance and polymorphism. Difference between abstract classes and interfaces.
  • Exception Handling – Checked vs unchecked exceptions, try-catch-finally blocks, custom exceptions, throwing and propagating exceptions.
  • Multithreading – Thread lifecycle, implementing threads using Runnable and Thread class, synchronized keyword, inter-thread communication using wait(), notify() etc.
  • JDBC – Steps for connecting to a database, use of PreparedStatements vs Statements, handling ResultSet. Transaction management.
  • Collections – Commonly used methods in Map, List, Set. Difference between ArrayList and LinkedList. Comparator and Comparable.
  • Java 8 – Lambda expressions, method references, functional interfaces, streams, date/time API.
  • Spring – Dependency injection, IOC container, ApplicationContext. Spring MVC request flow, REST APIs using Spring.
  • Hibernate – Lazy loading, eager loading, dirty checking, caching. Hibernate annotations and configuring session factory.
  • Microservices – RESTful web services, challenges in microservices, API gateways, service discovery.
  • Design Patterns – Singleton, factory, observer, decorators, template, strategy. Experience in applying patterns.
  • Testing – JUnit, Mockito, mocking private/void methods, parameterized tests. Integration vs unit testing.
  • Build Tools – Maven, dependency management, build cycles.
Share this Doc

Java interview questions for 3 to 5 years of experience

Or copy link

CONTENTS