StaticImportspublic class StaticImports extends Object Demonstration of thestatic import facility of Tiger, JDK 1.5. |
Methods Summary |
---|
public void | firstMethod(java.awt.Graphics g, int errCode)
if (errCode >= 3) {
g.setColor(StatusColors.ERROR);
} else if (errCode == 2) {
g.setColor(StatusColors.WARNING);
} else if (errCode == 1) {
g.setColor(StatusColors.DEFAULT);
} else {
assert (false);
}
| public void | mathMethod(int x, int y)
int z = max(x, y);
double sqrt = sqrt(z^5);
| public void | secondMethod(java.awt.Graphics g, int errCode)
if (errCode >= 3) {
g.setColor(ERROR);
} else if (errCode == 2) {
g.setColor(WARNING);
} else if (errCode == 1) {
g.setColor(DEFAULT);
} else {
assert (false);
}
|
|