File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
Doubt in encapsulation.
Joined: Nov 06, 2006
Oct 21, 2010 05:36:01
The main benefit of encapsulation is the ability to modify our implemented code without breaking the code of others who use our code. With this feature Encapsulation gives maintainability, flexibility and extensibility to our code.
Can you please explain me with an example ?.
Joined: Sep 28, 2010
Oct 21, 2010 06:37:00
Joined: Feb 08, 2009
Oct 21, 2010 07:54:52
The Java library is perhaps the best example ... Take for instance the
Its been around for quite a long time, but the interface the it has provided to its users has remained stable.
However it has under gone a lot of internal changes to make it more efficient, faster...
By encapsulating away these details of how it works internally, it has shielded the user from any problems.
Kind of simplified but I hope it gets the point across ....
Cheers - Sam.
Twisters - The new age Java Quiz
It is sorta covered in the
JavaRanch Style Guide
subject: Doubt in encapsulation.
Enacpusaltion In Java can anybody explain with small practical example
WA #1.....word association
Anybody jus started preparation for SCJP?
getters and setters provide abstraction or encapsulation ?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013