Reputation: 13
I am new to stackoverflow and Java programming. I was practicing inheritance with sample code and I was wondering if there is any access modifier that will allow the variable to be accessed by methods in the same package.
Thanks
UPDATE:
Found the answer. Package modifier does the trick.
Upvotes: 0
Views: 231
Reputation: 14939
default modifier, in other words, no modifier (not public, not private, and not protected):
void doSomething() {
}
Upvotes: 5