What is an object in Java and what are its benefits?
Answer Posted / sumit pal singh
An object in java is a runtime entity of a java class. It has two characteristics 1. State (variables) and 2. Behavior (methods). It has below benefits
1. By creating the object of one class into another class we can get the state and behaviour of another class . i.e. Composition is best example for using the object.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is a blocking method in Java?
When a byte datatype is used?
What is a parameter in a function?
What is a singleton class? Give a practical example of its usage.
What does a method signature consist of?
What about static nested classes in java?
What will be the initial value of an object reference which is defined as an instance variable?
What is array initialization in java?
How many bits is a string?
What are wrapped classes in java programming?
What are the methods of object class ?
what is recursion in java
Is ++ operator thread-safe in java?
What is data type in computer?
Explain what do you mean by functional overloading in java?