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 the java idl system?
What is the use of arraylist in java?
What is ++ a in java?
What are the differences between the constructors and methods?
How to sort numbers in java without array?
How can we avoid including a header more than once?
What is the Concept of Encapsulation in OOPS
how we can create packages in java?
What is nan inf?
What does this () mean in java?
What is java algorithm?
Tell me a few examples of final classes defined in Java API?
Give some features of interface?
Is there any case when finally will not be executed?
What is bubble sort in java?