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
How to create a fecelet view?
Why collection doesn’t extend cloneable and serializable interfaces?
What restrictions are placed on method overriding?
What is the main use of java?
What is an accessor?
How to call one constructor from the other constructor ?
What is meant by stack and queue?
Which data type is a class in java?
What is java object name?
How to access arraylist elements in java?
Why is multiple inheritance not supported in java?
What are the application of stack?
Can we have 2 main methods in java class?
why java uses class level type casting ?
What is the maximum size of hashmap in java?