WalzoneInterview Prep
๐Ÿ“ž Interviewing soon? Practice with a realistic AI mock phone interview โ€” it calls you, then scores you. First 15 min FREE โ†’

100 Core Java Interview Questions and Answers

Java Ecosystem ยท 100 questions, each with a full written answer โ€” free, no sign-up.

Reading is step one. Saying it out loud is the interview. Our AI interviewer calls your phone and runs a realistic Core Java interview โ€” then scores it.
๐Ÿ“ž Practice Core Java โ€” free 15 min
๐Ÿ“• Buy this interview preparation book: 100 Core Java questions & answers โ€” PDF + EPUB for $5
Basic 20Intermediate 20Advanced 20Expert 20Guru 20

Basic

  1. What is Java?
  2. What are the key features of Java?
  3. What is the difference between JDK, JRE, and JVM?
  4. What are the basic data types in Java?
  5. What is the difference between int and Integer in Java?
  6. What is an object in Java?
  7. What is a class in Java?
  8. What is the difference between a class and an object in Java?
  9. What is the difference between static and non-static methods in Java?
  10. What is inheritance in Java?
  11. What is the difference between abstract class and interface in Java?
  12. What is the difference between public, private, and protected access modifiers in Java?
  13. What is a package in Java?
  14. What is the difference between == and equals() method in Java?
  15. What is the difference between a checked and an unchecked exception in Java?
  16. What is a final keyword in Java?
  17. What is a static keyword in Java?
  18. What is a constructor in Java?
  19. What is the purpose of the main() method in Java?
  20. What is a JVM (Java Virtual Machine)?

Intermediate

  1. What is the difference between an abstract class and an interface in Java?
  2. What is a static method in Java? Can you override a static method in Java?
  3. What is a singleton class in Java? How would you implement it?
  4. What is the difference between a StringBuilder and a StringBuffer in Java?
  5. What is a constructor in Java? Can you overload a constructor in Java?
  6. What is a package in Java? What is the default package in Java?
  7. What is an exception in Java? What are checked and unchecked exceptions?
  8. What is polymorphism in Java? How is it achieved?
  9. What is method overloading in Java? How is it different from method overriding?
  10. What is a garbage collector in Java? How does it work?
  11. What is the difference between an array and an ArrayList in Java?
  12. What is a hash table in Java? How is it different from a HashMap?
  13. What is synchronization in Java? Why is it important?
  14. What is a thread in Java? How would you create and start a thread?
  15. What is the difference between wait() and sleep() methods in Java?
  16. What is the difference between equals() and hashCode() methods in Java?
  17. What is a final keyword in Java? How is it used?
  18. What is an enumeration in Java? How would you use it?
  19. What is the difference between a stream and a reader/writer in Java?
  20. What is the difference between an interface and an abstract class in Java?

Advanced

  1. What is reflection in Java? How is it used?
  2. What is the difference between a weak reference and a soft reference in Java?
  3. What is a memory leak in Java? How do you prevent it?
  4. What is the difference between a stack and a heap memory in Java?
  5. What is a ClassLoader in Java? How does it work?
  6. What is the difference between a compile-time error and a runtime error in Java?
  7. What is serialization in Java? How do you implement it?
  8. What is a lambda expression in Java? How is it used?
  9. What is a functional interface in Java? How is it different from a regular interface?
  10. What is a CompletableFuture in Java? How is it used?
  11. What is a CompletableFuture exceptionally() method in Java? How is it used?
  12. What is the difference between ReentrantLock and synchronized keyword in Java?
  13. What is a thread pool in Java? How does it work?
  14. What is a concurrent collection in Java? How is it used?
  15. What is the difference between ConcurrentHashMap and HashMap in Java?
  16. What is a CompletableFuture join() method in Java? How is it used?
  17. What is a deadlock in Java? How do you prevent it?
  18. What is a volatile keyword in Java? How is it used?
  19. What is a synchronized block in Java? How is it different from a synchronized method?
  20. What is the difference between a callable and a runnable in Java?

Expert

  1. What is metaspace in Java? How does it differ from PermGen space?
  2. What is a Safepoint in Java? How does it impact application performance?
  3. What is the difference between a concurrent mark and sweep collector and a parallel collector in Java?
  4. What is a G1 garbage collector in Java? How does it work?
  5. What is an escape analysis in Java? How is it used?
  6. What is a CodeCache in Java? How does it work?
  7. What is a JITWatch in Java? How is it used?
  8. What is a Jol in Java? How is it used?
  9. What is a ThreadLocal in Java? How is it used?
  10. What is a CompletableFuture exceptionally() method in Java? How is it used?
  11. What is a CompletableFuture join() method in Java? How is it used?
  12. What is a CompletableFuture thenCombine() method in Java? How is it used?
  13. What is a CompletableFuture thenAccept() method in Java? How is it used?
  14. What is a CompletableFuture allOf() method in Java? How is it used?
  15. What is a CompletableFuture anyOf() method in Java? How is it used?
  16. What is the difference between a Future and a CompletableFuture in Java?
  17. What is a ConcurrentHashMap in Java? How does it work?
  18. What is a ForkJoinPool in Java? How is it used?
  19. What is a Phaser in Java? How is it used?
  20. What is a Spliterator in Java? How is it used?

Guru

  1. What is a microservices architecture? How is it different from a monolithic architecture?
  2. What is a cloud-native application? How is it designed and developed?
  3. What is a distributed system? What are the challenges of building and maintaining distributed systems?
  4. What is a service mesh in microservices architecture? How is it used?
  5. What is a reactive programming? How is it used in building high-performance and scalable systems?
  6. What is a containerization in Java? How does it help in building and deploying applications?
  7. What is a Kubernetes in Java? How is it used in container orchestration and management?
  8. What is a serverless architecture? How is it implemented and deployed?
  9. What is a DevOps in Java? How is it used in software development and delivery?
  10. What is a Continuous Integration (CI) and Continuous Deployment (CD) in Java? How is it used in software development and delivery?
  11. What is a reactive system in Java? How is it different from traditional systems?
  12. What is a design pattern in Java? How is it used in designing and implementing software systems?
  13. What is a software architecture? How do you design and document a software architecture?
  14. What is a CQRS (Command Query Responsibility Segregation) in Java? How is it used in designing and building software systems?
  15. What is a event-driven architecture in Java? How is it used in building software systems?
  16. What is a hexagonal architecture in Java? How is it used in building software systems?
  17. What is a reactive system in Java? How is it different from traditional systems?
  18. What is a message-driven architecture in Java? How is it used in building software systems?
  19. What is a RESTful API design in Java? How is it designed and implemented in building software systems?
  20. Explain the principles of SOLID and give an example of how you have applied them in your Java code.?
๐Ÿ“• Buy this interview preparation book: 100 Core Java questions & answers โ€” PDF + EPUB for $5
Reading is step one. Saying it out loud is the interview. Our AI interviewer calls your phone and runs a realistic Core Java interview โ€” then scores it.
๐Ÿ“ž Practice Core Java โ€” free 15 min