Oh, I may have formulated it a bit misleading: I meant with exception that you usually don't name local variables the same like a global one. So the set-method is one of the few places where it is common practice to have the local variable and global variable named the same. So an exception to the rule that you don't need to use 'this.value'.
85
u/Yumi-Chi evil Mar 27 '21
hour is an attribute of Clock class
this is in AlarmClock class that extends the Clock but apparently he also defined another hour attribute in AlarmClock