[Solved] Java access a protected attribute [closed]
“Unreachable statement” means that there is no path in your code that can get you to this line in your program. It has nothing to do with protected fields. Check, if there is a return statement before your a+=1 that always exits your method before this line is ever reached. Or, if your a+=1 is … Read more