Java Interview Questions & Answers part 4

0
310
Q: – What is Abstraction?

Abstraction refers to the act of representing essential features without including the background details or explanations.

Q: – Which method is used to garbage collect an object?

finalize ()

Q: – What is casting?

Casting is process of convert the value of one type to another.

Q: – What declarations are required for every Java application?

A class and the main( ) method declarations.

Q: – What modifiers may be used with top-level class?

public
Abstract
final.

Q: – What is Encapsulation?

Encapsulation is a technique used for hiding the properties and behaviors of an object and allowing outside access only as appropriate. It prevents other objects from directly altering or accessing the properties or methods of the encapsulated object.

Q: – What is phantom memory?

Phantom memory is false memory. Memory that does not exist in reality.

Q: – Is a class a subclass of itself?

Yes

Q: – What is Dynamic Binding?

Dynamic binding (also known as late binding) means that the code associated with a given procedure call is not known until the time of the call at run-time.

Submitted By:-Ankur Jain           Email-ID: – ankurjain548@gmail.com

SHARE

LEAVE A REPLY