GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java
Go To First  |  Previous Question  |  Next Question 
 Core Java  |  Question 25 of 493    Print  
What is data encapsulation? What does it buy you

  
Total Answers and Comments: 8 Last Update: March 13, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
June 03, 2005 14:48:39   #1  
joadavis        

RE: What is data encapsulation? What does it buy you
The most common example I can think of is a javabean. Encapsulation may be used by creating 'get' and 'set' methods in a class which are used to access the fields of the object. Typically the fields are made private while the get and set methods are public. 
 
Encapsulation can be used to validate the data that is to be stored, to do calculations on data that is stored in a field or fields, or for use in introspection (often the case when using javabeans in Struts, for instance).

 
Is this answer useful? Yes | No
July 27, 2005 05:17:13   #2  
anil sharma        

RE: What is data encapsulation? What does it buy you
Wrapping of data and function into a single unit is called as data encapsulation. 
 
It buys the data security(oops feature).

 
Is this answer useful? Yes | No
August 05, 2005 01:56:17   #3  
Amit Gohil        

RE: What is data encapsulation? What does it buy you
Encapsulation is a mechanism that combine to gether code and data that it manipulate. It is protective wraper to prevent the access of code and data from out side world or we can say from other class.
 
Is this answer useful? Yes | No
September 02, 2005 01:14:25   #4  
Pavan        

RE: What is data encapsulation? What does it buy you
The basic "class cocept" of Java is nothing but Encapsulation. In a class Data members and methods are wrapped / combined. In a class we can specify the variables as private. So for other classes it will not be accessible. Thru member functions / methods only we can access the member variables or modify them. It gives more security for our data.
 
Is this answer useful? Yes | No
September 28, 2005 09:32:10   #5  
sai        

RE: What is data encapsulation? What does it buy you

it is datahiding

it is one of the oops features only


 
Is this answer useful? Yes | No
October 17, 2005 23:58:48   #6  
Ravi Kumar        

RE: What is data encapsulation? What does it buy you

Encapsulation:wrappering up the data and associated methods into a single unit in such a way that  data can be accessed with the help of associated methods.

Encapsulation provides data security.  It is nothing but data hiding.


 
Is this answer useful? Yes | No
October 28, 2005 04:33:48   #7  
Devidas Sonawane        

RE: What is data encapsulation? What does it buy you
Encapsulation:- it is a mechanism to binds data and bytecodes and b'coz of that data is protected and becomes secure. 
 
Is this answer useful? Yes | No
March 13, 2006 05:29:11   #8  
ragini.rani Member Since: March 2006   Contribution: 1    

RE: What is data encapsulation? What does it buy you

encapsulation mean data hiding.data correspond to varibles and methods of the class. Data hiding mean: when u make different objects of the same class. The data stored in one object is unaware of the data for other object of the same class. In, this way it gives secure data.


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape