CONTENTS | PREV | NEXT Java Code Conventions


4.4 Class and Interface Declarations

When coding Java classes and interfaces, the following formatting rules should be followed:

class Sample extends Object {
int ivar1;
int ivar2;

Sample(int i, int j) {
ivar1 = i;
ivar2 = j;
}

int emptyMethod() {}

...
}


CONTENTS | PREV | NEXT
Copyright © 1997 Sun Microsystems, Inc. All Rights Reserved.