Difference between protected and having no access modifier
java, protected, public, variables
Solution
It isn't same.
Both protected and no access modifier variables are accessible in the same package, but protected variables can be accessed by a subclass instance anywhere (in any package).
Problem
When declaring a variable in Java,what's the difference between "protected" and having "no access modifier"? Is it the same?