A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
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
I agree. Here's the link:
subject: Doubt in encapsulation.
Anybody jus started preparation for SCJP?
Enacpusaltion In Java can anybody explain with small practical example
WA #1.....word association
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