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


Please Help Members By Posting Answers For Below Questions

What is difference between array and vector?

541


What is connection class in java?

512


Explain the difference between collection api and stream api in java8?

513


What is jrmp?

552


What is final class?

579






describe synchronization in respect to multithreading? : Java thread

507


What are the object and class classes used for?

565


what is the difference between process and thread? : Java thread

565


What is class variable java?

587


What are conditionals and its types?

592


How does arraylist work in java?

536


What is integer size in java?

514


Difference between overriding and overloading in java?

582


What is data type in computer?

521


What is the difference between assignment and initialization?

565