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
Can we increase size of array?
What is the integer of 16?
What is a dynamic array in java?
What is encapsulation in java?
What are the various access specifiers for java classes?
os is developed in c no java is more secured then c na why dont the os developed is developed using java
What does opcode mean?
In a container there are 5 components. I want to display all the component names, how will you do that?
How many ways can you break a singleton class in java?
What modifiers may be used with an inner class that is a member of an outer class in java programming?
What is a prefix function.write down a code to compute prefix function.
Which methods cannot be overridden in java?
Explain the importance of throws keyword in java?
What is the purpose of encapsulation?
What is a lock or purpose of locks in java?