0% found this document useful (0 votes)
12 views

Core Java Questions

Uploaded by

Rukmini More
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Core Java Questions

Uploaded by

Rukmini More
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Core Java

1. Basic Concepts:

o What are the features of Java?

o Explain the difference between JDK, JRE, and JVM.

o What are Java’s access modifiers?

o How does Java achieve platform independence?

2. Object-Oriented Programming:

o What are the four pillars of OOP? Give examples.

o What is the difference between abstraction and encapsulation?

o Explain the difference between == and equals().

o What is method overloading and overriding?

3. Data Types and Variables:

o What are Java’s primitive data types?

o Explain the difference between final, finally, and finalize.

o What are static variables and methods? Provide examples.

4. Collections Framework:

o What is the difference between ArrayList and LinkedList?

o Explain the difference between HashMap, LinkedHashMap, and TreeMap.

o How does HashMap work internally?

o What is the difference between List, Set, and Queue?

5. Exception Handling:

o What is the difference between checked and unchecked exceptions?

o Explain the use of try, catch, finally, and throw in Java.

o How does Java’s exception hierarchy work?

Advanced Java Concepts

1. Multithreading and Concurrency:

o What is the difference between Thread and Runnable?

o Explain the concept of synchronization and locks in Java.

o What are volatile and transient keywords?

o How does Java’s ExecutorService work?


2. Generics:

o What are generics in Java? Why are they used?

o Explain the differences between ?, T, and E in generics.

o How are wildcards used in generics?

3. Java Streams and Lambda Expressions:

o What are lambda expressions? Provide an example.

o What are the differences between map() and flatMap() in streams?

o How do you use filter(), forEach(), and collect() in the Streams API?

4. Java Memory Management:

o Explain Java’s memory model.

o How does garbage collection work in Java?

o What are strong, weak, soft, and phantom references?

5. Reflection API:

o What is reflection in Java?

o What are some use cases of the Reflection API?

o What are the drawbacks of using reflection?

Java Frameworks and Libraries

1. Spring Framework:

o What is Dependency Injection (DI)?

o Explain the difference between @Component, @Service, @Repository, and


@Controller.

o What are Spring Boot’s main features?

o How does Spring handle transaction management?

2. Hibernate:

o What is Hibernate and why is it used?

o Explain the difference between get() and load() in Hibernate.

o What are Hibernate caching mechanisms?

o What is HQL (Hibernate Query Language)?

You might also like