so… just discovered that ‘protected' also grants visibility to all classes in the same package. Been doing Java a long time and somehow never noticed O_O
03/22/2017, 7:50 AM
i'm not following can you explain?
03/22/2017, 10:11 PM
If you declare a class variable as "protected" in Java, another class that belongs to the same package can access it as if it was public (but all other classes that aren't in the same package need to extend that class to access it).