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 modifiers may be used with a top-level class?
what is the major difference between linkedlist and arraylist in java?
How can you write a loop indefinitely in java programming?
What is the difference between double and float variables in java?
How many bits is a float?
What is integer valueof?
What is finalize()? Is finalize() similar to a destructor?
What is the difference between scrollbar and scrollpane?
Can arraylist contain null values?
Who developed java?
How to check if linked list contains loop in java?
What is use of a abstract variable?
Can we define a package statement after the import statement in java?
What is the symbol for average?
Difference between start() and run() method of thread class?