Java Reference
In-Depth Information
/** Describe the method. **/
public void methodName (. . .) {
int x = 5;
some - method (x);
if (test) {
do - something ();
}
else {
...
}
...
try {
xxx ();
}
catch (Exception e) {
handle - it ();
}
} // methodName - for longer methods
/** Longer comment.
* - this asterisk is ignored by javadoc
**/
public void someMethodWithLotsOfParameters (
int param1,
int param2,
etc.
) throws SomeException {
...
} // someMethodWithLotsOfParameters
/** Private method names with underscores. **/
private void some - method (int i) {
...
} // some - method
/** Getter method. **/
double getVal () {
return fVal;
}
/** Setter method. **/
void setVel (double val) {
fVal = val;
}
} // class SomeClassName
 
Search WWH ::




Custom Search