r/programming • • Jan 30 '14

Google Java Coding Standards

http://google-styleguide.googlecode.com/svn/trunk/javaguide.html
35 Upvotes

19 comments sorted by

View all comments

4

u/kersurk Jan 30 '14 edited Jan 30 '14

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.

3

u/Alborak Jan 31 '14

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