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

Core Java Interview Questions Partial

The document provides a list of core Java interview questions and answers, covering fundamental concepts such as the definition of Java, the differences between JDK, JRE, and JVM, and key features of the language. It explains important topics like the main method, the distinction between == and equals(), abstract classes, constructors, method overloading and overriding, singleton classes, and access modifiers. This resource serves as a guide for candidates preparing for Java-related interviews.

Uploaded by

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

Core Java Interview Questions Partial

The document provides a list of core Java interview questions and answers, covering fundamental concepts such as the definition of Java, the differences between JDK, JRE, and JVM, and key features of the language. It explains important topics like the main method, the distinction between == and equals(), abstract classes, constructors, method overloading and overriding, singleton classes, and access modifiers. This resource serves as a guide for candidates preparing for Java-related interviews.

Uploaded by

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

Core Java Interview Questions and Answers

1. What is Java?

Java is a high-level, object-oriented programming language that is platform-independent. It allows developers

to build programs that can run on multiple platforms.

2. What is the difference between JDK, JRE, and JVM?

JDK (Java Development Kit) is a complete environment for Java development. JRE (Java Runtime

Environment) provides the runtime environment. JVM (Java Virtual Machine) is responsible for running Java

bytecode.

3. What are the main features of Java?

Java is simple, object-oriented, platform-independent, secure, and supports multithreading.

4. What is the purpose of the main method in Java?

The main method serves as the entry point for any standalone Java application. Its signature is public static

void main(String[] args).

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

The == operator compares memory addresses, while the equals() method compares the actual content of the

objects.

6. What is an abstract class in Java?

An abstract class is a class that cannot be instantiated. It can have both abstract methods (without a body)

and concrete methods (with a body).

7. What is a constructor in Java?

A constructor is a special method used to initialize objects. It has the same name as the class and no return

type.

8. Explain method overloading and method overriding.

Page 1
Core Java Interview Questions and Answers

Method overloading allows multiple methods with the same name but different parameters. Method overriding

allows a subclass to provide a specific implementation of a method declared in its superclass.

9. What is a singleton class in Java?

A singleton class ensures that only one instance of the class is created. It is commonly used for resource

sharing.

10. What are access modifiers in Java?

Access modifiers define the scope of access to classes, methods, and variables. The main modifiers are

public, private, protected, and default (no modifier).

Page 2

You might also like