What is an object in Java and what are its benefits?
Answer Posted / javamasque
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. Encapsulation (Data hiding): It hides data and internal implementation from other objects.
2. Modularity (task modulation): It contains a set of activities for a specific task of an application.
3. Reusability: It facilitates reusability of functionality through inheritance.
4. Easy maintenance: It enhance the readability and understandability of an application. It also helps the developer to trace bugs in an application.
5. Pluggable/Unpluggable: An erroneous/unwanted object can be removed and a new object can be added in an application.
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is a concrete classes? Is Java object class is concrete class?
What are actual parameters?
What are the java ide's? Explain
How many bytes is string in java?
What are controls and their different types in awt?
How does the java compiler work?
What is sizeof in java?
What is object english?
What are the differences between wait() and sleep()?
What are the data types supported by java? What is autoboxing and unboxing?
What is the this keyword?
Describe how to implement singleton design pattern in struts.
What is complexity in java?
What does arrays sort do in java?
What is a line break?