( this )
instead of (that)
- slightly increases
the legibility of code. However, this style doesn't seem to be very common.
Example
/** * When using parentheses, extra spaces may be used to slightly * increase legibility. Here, both styles are illustrated for comparison. */ public final class ExtraSpace { public void explode( String thing ) { expand( thing ); //with extra spaces burst(thing); //without extra spaces } // PRIVATE private static final String BALLOON = "balloon"; private static final String TIRE = "tire"; private void expand( String thing ){ if ( thing.equals( BALLOON ) ) { //with extra spaces //..elided } else if (thing.equals(TIRE)){ //without extra spaces //..elided } else { //..elided } } private void burst( String thing ){ //with extra spaces //..elided } }