How do you make an object or method of an object have package scope (this is like friends in C++)?
"Can't" and "shouldn't" are two totally separate things. All questions should be answered. All answers should be true. That is why I post.
Just declare the variable or method with no accessibility modifer. Code: class X{ double rate; // default, package access. }
class X{ double rate; // default, package access. }
Java CodeBank Entries >> Parsing URL's| Collections/ShuffleElements | Threads isAlive() | Daemon Threads |Remote Class Loading | Sorted Keys (Map) | Backwards List | Thread States | Collections/Arrays Generics | Regular Expression(Grouping and Capturing) | Properties | JLabel/JTextField Combo | Reading Request Parameter Values | Host Lookup | Setting the size of a JFrames inner-region | GUI Native L&F
Forum Rules