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
Write code of any action class?
Explain about narrowing conversion in java?
What are thread groups?
Explain about exception propagation?
What is object english?
Difference between default and protected access specifiers?
What is thread pool in java with example?
What is polymorphism java example?
What happens to the Exception object after handling an exception?
What is difference between static class and normal class?
What kind of variables a class can consist of?
What means public static?
What data type is string java?
Define interface in java?
Can constructor be protected in java?