sigh...
Posted: Thu Aug 21, 2008 8:12 pm
Code: Select all
public boolean isWhiteGlove(){
boolean result = false;
if (this.equals(Division.WHITE_GLOVE)){
result = true;
}
return result;
}
Code: Select all
public boolean isWhiteGlove(){
boolean result = false;
if (this.equals(Division.WHITE_GLOVE)){
result = true;
}
return result;
}
Code: Select all
if (this.equals(Division.WHITE_POWER)){
result = [LOL RACISM];
}
return result;
} else {
System.out.println("We cool dawg");
Code: Select all
public boolean isWhiteGlove() {
return this == Division.WHITE_GLOVE;
}
eh? that does a different thing than the original function. == tests for object identity, .equals() for equality. unless that was the bug.Fender wrote:Just in case anyone was wondering the "right" way to do it...Code: Select all
public boolean isWhiteGlove() { return this == Division.WHITE_GLOVE; }