What is an object in Java and what are its benefits?

Answers were Sorted based on User's Feedback



What is an object in Java and what are its benefits?..

Answer / sumit pal singh

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. By creating the object of one class into another class we can get the state and behaviour of another class . i.e. Composition is best example for using the object.

Is This Answer Correct ?    2 Yes 0 No

What is an object in Java and what are its benefits?..

Answer / amit

In Java,The object will have its own state and access to all of the behavior defined by the class.

Is This Answer Correct ?    1 Yes 0 No

What is an object in Java and what are its benefits?..

Answer / chantiraji

Object is an instance of a class. The object will have its own state and access to all of the behavior defined by the class.

Is This Answer Correct ?    0 Yes 0 No

What is an object in Java and what are its benefits?..

Answer / 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

More Core Java Interview Questions

what is class.forname() and how it will be useful ?

3 Answers  


What are the different types of inheritance in java?

0 Answers  


if we give input as " hi how are you" then the output should be "uoy woh"...it should skip odd words in the input and should reverse even words from the end of string...can anyone help me to write this program in java

1 Answers  


What does || mean in vectors?

0 Answers  


What is return type in java?

0 Answers  






Give few examples of final classes defined in Java API?

0 Answers   BirlaSoft,


What is called module?

0 Answers  


What is the purpose of a statement block?

1 Answers  


Can you instantiate the math class in Java?

0 Answers   IBS,


Explain the term virtual machine?

0 Answers   Adobe,


Explain about anonymous inner classes ?

0 Answers  


class test { private static void main(String []adsf) { } } explain me that the above code is error or exception

3 Answers  


Categories