Hi Anil Well I guess thats it's not really neccessary to make a data member private for encapsulation. Default access and protected modifier should also do the work. It depends on how tightly encapsulated you want the data in your code to be.

Even where you only have package access, it still seems to me that you'd want tight encapsulation. Think of it from a user's point of view: what a pain it would be to have to wade through all the methods and fields to figure out what to do. It's much better to make the relevant methods and fields private, thus enabling the user to focus on what is important, ie what is accessible. [ May 26, 2003: Message edited by: Roger Chung-Wee ]