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 java reflection api?
What are use cases?
What is a java list?
What is singleton class in java and how can we make a class singleton?
Does java have extension methods?
what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent
What is the difference between jdk, jre, and jvm?
What is size of int in java?
What happens when heap memory is full?
Can constructor return value?
Is a method a function?
What does I ++ mean?
What is abstract class constructor called?
what is inner class in java?
Which method returns the length of a string?