can you make pdf of core java interview question
and answer with topic
I can't directly create or send files, but I can provide you with a well-structured, copy-paste-
ready set of Core Java interview questions and answers grouped by topic. You can easily
copy this content into a Word document or Google Docs and export it as a PDF.
Core Java Interview Questions and Answers
1. Java Basics
Q1: What is Java?
Java is a high-level, object-oriented programming language developed by Sun Microsystems. It
is platform-independent, meaning code written in Java can run on any device that supports the
Java Virtual Machine (JVM).
Q2: What is the difference between JDK, JRE, and JVM?
JDK (Java Development Kit): Contains tools for developing Java applications, including JRE
and compilers.
JRE (Java Runtime Environment): Provides libraries and JVM to run Java applications.
JVM (Java Virtual Machine): Executes Java bytecode and provides platform
independence.
2. Object-Oriented Programming (OOP) Concepts
Q3: What are the four main OOP concepts in Java?
Encapsulation: Bundling data and methods operating on that data within one unit (class).
Inheritance: Mechanism where one class acquires properties of another.
Polymorphism: Ability to take many forms; e.g., method overloading and overriding.
Abstraction: Hiding implementation details and showing only functionality.
Q4: What is the difference between ‘==’ and ‘.equals()’ in Java?
== compares object references (memory address).
.equals() compares object values (content).
3. Constructors and Methods
Q5: What is a constructor?
A constructor is a special method called when an object is instantiated. It has the same name as
the class and no return type.
Q6: What is method overloading and method overriding?
Overloading: Multiple methods with the same name but different parameters in the same
class.
Overriding: Subclass provides a specific implementation for a method already defined in its
superclass.
4. Collections
Q7: What is the difference between ArrayList and LinkedList?
ArrayList: Fast for random access, slow for insertions/deletions in the middle.
LinkedList: Fast for insertions/deletions, slow for random access.
5. Exception Handling
Q8: What is the difference between checked and unchecked exceptions?
Checked exceptions: Checked at compile-time (e.g., IOException).
Unchecked exceptions: Checked at runtime (e.g., NullPointerException).
Q9: What is the difference between final, finally, and finalize?
final: Keyword to declare constants or prevent inheritance/overriding.
finally: Block that executes after try-catch, regardless of exception.
finalize(): Method called by the garbage collector before object destruction.
6. Multithreading
Q10: What is multithreading in Java?
Multithreading is executing multiple threads simultaneously to maximize CPU usage.
Implemented by extending the Thread class or implementing the Runnable interface.
7. Miscellaneous
Q11: What is the difference between an abstract class and an interface?
Abstract class: Can have abstract and concrete methods, state, and constructors.
Interface: Only abstract methods (Java 8+ allows default/static methods), no state.
Q12: What is serialization?
Serialization is the process of converting an object into a byte stream for storage or
transmission.
To create a PDF:
1. Copy the above content into a document editor (Word, Google Docs, etc.).
2. Format as needed.
3. Export or download as PDF.
Let me know if you want more questions, answers, or a specific format!