aspose file tools*
The moose likes Beginning Java and the fly likes package problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "package problem" Watch "package problem" New topic
Author

package problem

Marc Shiest
Ranch Hand

Joined: Jun 09, 2001
Posts: 46
Lets say you have two packages...package a and package b...and in package a you have a private variable, then you import package a to package b...this private variable is not visible in package b...correct?
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
The private variable is not accesible outside of the class.
Matthew Phillips

Matthew Phillips
manish paliwal
Greenhorn

Joined: May 18, 2001
Posts: 16
yes, it is correct because private modifier is actually made for security of the varible . You can use that variable through the methods (from same class in which private varibles are declared) but you can modify that variables value.
It is the part of ENCAPSULATION.
ok ..


------------------
manish paliwal(or just mann )


manish paliwal(or just mann )
Marc Shiest
Ranch Hand

Joined: Jun 09, 2001
Posts: 46
Thanks guys...just wanted to make sure
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: package problem