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

Java Interview Questions Freshers

Java fresher learning

Uploaded by

Mugunthan R
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Java Interview Questions Freshers

Java fresher learning

Uploaded by

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

Java Interview Questions for Freshers

Core Java Concepts:

1. What are the basic data types in Java?

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

3. What is the purpose of the 'main' method in Java?

4. How does the 'for-each' loop differ from a traditional 'for' loop?

5. What is the difference between '== ' and '.equals()' in Java?

OOP Principles:

1. What are the four pillars of Object-Oriented Programming?

2. Explain the concept of inheritance in Java with an example.

3. How does polymorphism work in Java?

4. What is encapsulation, and how do you achieve it in Java?

5. Can you explain abstraction in Java and provide an example?

Exception Handling:

1. What is an exception in Java?

2. How do you handle exceptions in Java using try-catch blocks?

3. What is the difference between 'throw' and 'throws'?

4. Explain the concept of a custom exception with an example.

5. What are checked and unchecked exceptions in Java?

Collections Framework:

1. What are the main interfaces in the Java Collections Framework?

2. What is the difference between a List, Set, and Map in Java?


3. How does HashMap work in Java?

4. What is the difference between ArrayList and LinkedList?

5. How do you iterate over a HashMap?

Multithreading:

1. What is a thread in Java?

2. How do you create a thread in Java?

3. Explain the concept of synchronization in Java.

4. What is the difference between 'wait()' and 'sleep()' in Java?

5. How do you handle concurrency in Java?

Java 8 Features:

1. What are lambda expressions in Java 8?

2. Explain the Stream API in Java 8.

3. What is a functional interface in Java?

4. How does the 'Optional' class work in Java 8?

5. What is the purpose of the 'default' and 'static' methods in interfaces?

JVM Internals:

1. What is the JVM, and what is its role in Java?

2. How does garbage collection work in Java?

3. What are the different memory areas allocated by the JVM?

4. Explain the class loading process in Java.

5. What are the types of garbage collectors in Java?

You might also like