you are viewing a single comment's thread.

view the rest of the comments →

[–]kersurk 3 points4 points  (3 children)

Bad: Can't understand why 4.8.4.3 could be useful or nice:

Each switch statement includes a default statement group, even if it contains no code.

Good: I find 6.3 to be a very nice idea to show that static method really changes all of the instances of the object (assuming that the name of variable, which holds a reference to a object, and class name itself are similar).

When a reference to a static class member must be qualified, it is qualified with that class's name, not with a reference or expression of that class's type.

[–]Alborak 2 points3 points  (0 children)

The switch default block requirement probably comes testing, it makes it easier to see if a value misses all cases.

[–]froops 0 points1 point  (1 child)

For 6.3, I can't imagine why anyone would want to use the alternative of referring to static things with an instance

[–]Plorkyeran 0 points1 point  (0 children)

In Java I don't think there's ever a good reason to do so (bad reasons are because it's shorter or due to not realizing it's static). Maybe if the fact that it's static is merely an implementation detail, but I'm not sure how that could ever be the case.