aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Encapsulation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Encapsulation" Watch "Encapsulation" New topic
Author

Encapsulation

akshay dev
Greenhorn

Joined: Nov 08, 2012
Posts: 19
Can anyone give me a link for encapsulation? I didnt understand it very well.
Kevin Florish
Ranch Hand

Joined: Jan 06, 2009
Posts: 175
This may help with a basic understanding of Encapsulation.


Java5 Tutorials | Java6 Tutorials | HTML/CSS Tutorials | JavaScript and jQuery Tutorials
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 758
Encapsulation: an object "keeps" its attributes and values, which are not known to other objects.
Usually, use private for these attributes and use getter to get them.
Adriano Ribeiro
Greenhorn

Joined: Nov 16, 2012
Posts: 7
Michael Lee Scott, Programming language pragmatics, Edition 2, Morgan Kaufmann, 2006, ISBN 0126339511, p. 481: "Encapsulation mechanisms enable the programmer to group data and the subroutines that operate on them together in one place, and to hide irrelevant details from the users of an abstraction."
Rahul mir
Ranch Hand

Joined: Oct 31, 2012
Posts: 38

Encapsulation refers to the bundling of data with the methods that operate on that data.
http://www.javaworld.com/jw-05-2001/jw-0518-encapsulation.html
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Encapsulation