Trond Valen

Greenhorn
+ Follow
since Aug 31, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Trond Valen

I partly agree, it is the same as default access, but why is the protected modifier allowed for enum variables when enums can't be "subclassed"? I thought the main principle was that modifiers that make no sense or introduce redundancy are not allowed, just like classes can't be protected or private. In this case, protected is redundant, because it's the same as having no modifiers (default access).

But then again, protected variables are allowed in final classes, and enums can be seen as a special kind of final classes. This brings me to another question: can you always choose access modifiers for class and instance variables regardless of which modifiers the class has?
[ August 31, 2007: Message edited by: Trond Valen ]
16 years ago