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 difference between array and vector?
What is connection class in java?
Explain the difference between collection api and stream api in java8?
What is jrmp?
What is final class?
describe synchronization in respect to multithreading? : Java thread
What are the object and class classes used for?
what is the difference between process and thread? : Java thread
What is class variable java?
What are conditionals and its types?
How does arraylist work in java?
What is integer size in java?
Difference between overriding and overloading in java?
What is data type in computer?
What is the difference between assignment and initialization?