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
- What is Java?
- What are the key features of Java?
- What is the difference between JDK, JRE, and JVM?
- What are the basic data types in Java?
- What is the difference between int and Integer in Java?
- What is an object in Java?
- What is a class in Java?
- What is the difference between a class and an object in Java?
- What is the difference between static and non-static methods in Java?
- What is inheritance in Java?
- What is the difference between abstract class and interface in Java?
- What is the difference between public, private, and protected access modifiers in Java?
- What is a package in Java?
- What is the difference between == and equals() method in Java?
- What is the difference between a checked and an unchecked exception in Java?
- What is a final keyword in Java?
- What is a static keyword in Java?
- What is a constructor in Java?
- What is the purpose of the main() method in Java?
- What is a JVM (Java Virtual Machine)?
Intermediate
- What is the difference between an abstract class and an interface in Java?
- What is a static method in Java? Can you override a static method in Java?
- What is a singleton class in Java? How would you implement it?
- What is the difference between a StringBuilder and a StringBuffer in Java?
- What is a constructor in Java? Can you overload a constructor in Java?
- What is a package in Java? What is the default package in Java?
- What is an exception in Java? What are checked and unchecked exceptions?
- What is polymorphism in Java? How is it achieved?
- What is method overloading in Java? How is it different from method overriding?
- What is a garbage collector in Java? How does it work?
- What is the difference between an array and an ArrayList in Java?
- What is a hash table in Java? How is it different from a HashMap?
- What is synchronization in Java? Why is it important?
- What is a thread in Java? How would you create and start a thread?
- What is the difference between wait() and sleep() methods in Java?
- What is the difference between equals() and hashCode() methods in Java?
- What is a final keyword in Java? How is it used?
- What is an enumeration in Java? How would you use it?
- What is the difference between a stream and a reader/writer in Java?
- What is the difference between an interface and an abstract class in Java?
Advanced
- What is reflection in Java? How is it used?
- What is the difference between a weak reference and a soft reference in Java?
- What is a memory leak in Java? How do you prevent it?
- What is the difference between a stack and a heap memory in Java?
- What is a ClassLoader in Java? How does it work?
- What is the difference between a compile-time error and a runtime error in Java?
- What is serialization in Java? How do you implement it?
- What is a lambda expression in Java? How is it used?
- What is a functional interface in Java? How is it different from a regular interface?
- What is a CompletableFuture in Java? How is it used?
- What is a CompletableFuture exceptionally() method in Java? How is it used?
- What is the difference between ReentrantLock and synchronized keyword in Java?
- What is a thread pool in Java? How does it work?
- What is a concurrent collection in Java? How is it used?
- What is the difference between ConcurrentHashMap and HashMap in Java?
- What is a CompletableFuture join() method in Java? How is it used?
- What is a deadlock in Java? How do you prevent it?
- What is a volatile keyword in Java? How is it used?
- What is a synchronized block in Java? How is it different from a synchronized method?
- What is the difference between a callable and a runnable in Java?
Expert
- What is metaspace in Java? How does it differ from PermGen space?
- What is a Safepoint in Java? How does it impact application performance?
- What is the difference between a concurrent mark and sweep collector and a parallel collector in Java?
- What is a G1 garbage collector in Java? How does it work?
- What is an escape analysis in Java? How is it used?
- What is a CodeCache in Java? How does it work?
- What is a JITWatch in Java? How is it used?
- What is a Jol in Java? How is it used?
- What is a ThreadLocal in Java? How is it used?
- What is a CompletableFuture exceptionally() method in Java? How is it used?
- What is a CompletableFuture join() method in Java? How is it used?
- What is a CompletableFuture thenCombine() method in Java? How is it used?
- What is a CompletableFuture thenAccept() method in Java? How is it used?
- What is a CompletableFuture allOf() method in Java? How is it used?
- What is a CompletableFuture anyOf() method in Java? How is it used?
- What is the difference between a Future and a CompletableFuture in Java?
- What is a ConcurrentHashMap in Java? How does it work?
- What is a ForkJoinPool in Java? How is it used?
- What is a Phaser in Java? How is it used?
- What is a Spliterator in Java? How is it used?
Guru
- What is a microservices architecture? How is it different from a monolithic architecture?
- What is a cloud-native application? How is it designed and developed?
- What is a distributed system? What are the challenges of building and maintaining distributed systems?
- What is a service mesh in microservices architecture? How is it used?
- What is a reactive programming? How is it used in building high-performance and scalable systems?
- What is a containerization in Java? How does it help in building and deploying applications?
- What is a Kubernetes in Java? How is it used in container orchestration and management?
- What is a serverless architecture? How is it implemented and deployed?
- What is a DevOps in Java? How is it used in software development and delivery?
- What is a Continuous Integration (CI) and Continuous Deployment (CD) in Java? How is it used in software development and delivery?
- What is a reactive system in Java? How is it different from traditional systems?
- What is a design pattern in Java? How is it used in designing and implementing software systems?
- What is a software architecture? How do you design and document a software architecture?
- What is a CQRS (Command Query Responsibility Segregation) in Java? How is it used in designing and building software systems?
- What is a event-driven architecture in Java? How is it used in building software systems?
- What is a hexagonal architecture in Java? How is it used in building software systems?
- What is a reactive system in Java? How is it different from traditional systems?
- What is a message-driven architecture in Java? How is it used in building software systems?
- What is a RESTful API design in Java? How is it designed and implemented in building software systems?
- 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