Java basics interview Questions answers.

 Java basic interview questions answers.

1. Why is Java not a pure object-oriented language?
            Java is not a pure object-oriented language due to primitive data types like boolean, byte, char, int, float, double, and short. 
To make Java object-oriented we have to use Wrapper classes to make the primitive data type into an object of that class. Some Wrapper classes are Byte, Boolean, Char, Integer, Short etc.
2. What is Object Oriented Programming (OOPs)?
                Object Oriented Programming (OOPs) is a programming model that allows to organize the complete software design around the objects talking to each other rather than functions and logic.
3. What is a class?
A class denotes a category of objects and acts as a blueprint for creating such objects having common properties and methods. It is a user-defined data type that contains the data members and fields that operate on the data.
4. What is an Object?
An object is an instance of a class. The Object is constructed suing the class as a blueprint and is a concrete instance of the abstraction that the class represents. The process of creating objects is called instantiation. In simple terms, they are the actual world entities that have a state and behaviour.
Post a Comment (0)
Previous Post Next Post