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 import java util arraylist?

0 Answers  


1) Find the Merge point of two linked lists. 2) Swap two bits of integer. 3) Reverse individual words of the sentence. 4) Reverse string without using temp string.

2 Answers   HCL,


What is defined as false sharing in the context of multithreading?

0 Answers  


What is an Iterator interface?

2 Answers  


what is the purpose of the final in the try-catch-final

7 Answers  






Can we extend private class in java?

0 Answers  


Can any one say how will sort map objects in java?

2 Answers   TCS,


How the threads are synchronized?

2 Answers   BMC, CTS,


Create a form of user Login in JSP, that accepts the user name and password from user and authenticate it with user names and passwords stored in database. (Plz provide me answer immediately)

1 Answers   ABC,


33. try { 34. // some code here 35. } catch (NullPointerException e1) { 36. System.out.print(”a”); 37. } catch (RuntimeException e2) { 38. System.out.print(”b”); 39. } finally { 40. System.out.print(”c”); 41. } What is the result if a NullPointerException occurs on line 34? 1 c 2 a 3 ab 4 ac

5 Answers  


Does java trim remove newline?

0 Answers  


why applet doesn't have main? isn't possible a program with out main?

9 Answers   TCS,


Categories