How do you make an object or method of an object have package scope (this is like friends in C++)?
Printable View
How do you make an object or method of an object have package scope (this is like friends in C++)?
Just declare the variable or method with no accessibility modifer.
Code:class X{
double rate; // default, package access.
}