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
Is java a security risk?
How will you print number in reverse (descending) order in BST.
what is meant wrapper classes?
Does A Class Inherit The Constructors Of Its Superclass?
State differences between C and Java?
What is the method in java?
Where are local variables stored?
What is replacefirst in java?
Explain an intermediate language?
What is string in java?
Which object oriented concept is achieved by using overloading and overriding?
What is runtime polymorphism or dynamic method dispatch?
what is the difference between thread and runnable types? : Java thread
What does jenkins do?
Write a program to print 15 random numbers using foreach of java 8?