Tuesday, January 7, 2025
HomeProgramming200 + core java interview questions and answers

200 + core java interview questions and answers

Sure! Here is a concise list of 200+ Core Java Interview Questions and Answers (2024):

1. Basic Java Concepts

1. What is Java?

A platform-independent, object-oriented programming language.

2. What is JVM?

Java Virtual Machine, it runs Java byte code on any platform.

3. What is JDK vs JRE?

JDK includes tools for development, while JRE only includes libraries to run Java apps.

4. What is a Constructor?

A special method used to initialize objects.

5. Difference between == and equals()?

== compares references; equals() compares values.

6. What is method overloading?

See also  Learn Hibernate Tutorial

Same method name, different parameter lists.

7. What is method overriding?

A subclass provides a specific implementation of a method.

8. What is the static keyword?

Indicates class-level fields or methods, shared by all instances.

9. What is a final keyword?

Used to declare constants, prevent method overriding, and prevent class inheritance.

10. What are access modifiers?

Keywords like public, private, protected, and default for defining visibility.

2. Object-Oriented Programming (OOP)

11. What is Encapsulation?m

Hiding data and providing methods to access it

12. What is Inheritance?

See also  Accessor and Mutator in Java

A mechanism where one class inherits properties and behaviors from another.

13. What is Polymorphism?

Ability of objects to take many forms, via method overloading or overriding.

14. What is Abstraction?

Hiding the complexity and showing only essential features.

15. Abstract Class vs Interface?

Abstract class can have implemented methods; Interface (up to Java 7) has abstract methods.

16. What is a Superclass?

A class being inherited from by subclasses.

17. What is the this keyword?

Refers to the current instance of a class.

18. What is super keyword?

See also  Java For Loop

Refers to the superclass.

19. What is the use of instance of?

Checks if an object is an instance of a specific class or subclass.

20. What is a constructor chaining?

Calling one constructor from another within the sa

me class or superclass.

3. Collections Framework

21. What is the Collection Framework?

 

 

 

 

 

RELATED ARTICLES
0 0 votes
Article Rating

Leave a Reply

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
- Advertisment -

Most Popular

Recent Comments

0
Would love your thoughts, please comment.x
()
x