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 are the advantages of unicode?
What is methods and methodology?
Explain different states of a thread in java?
Why volatile is used in java?
What are the kinds of polymorphism?
What is reverse function?
How many characters is 16 bytes?
What is the importance of finally block in exception handling?
What is the use of static class?
'A class is a template for an object' explain this statement.
Is 0 true or is 1 true?
What is a java applet? What is an interface?
What is a java string?
Why charat is used in java?
What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?