sigh...

Locked
Fender
Posts: 5876
Joined: Sun Jan 14, 2001 8:00 am

sigh...

Post by Fender »

Code: Select all

	public boolean isWhiteGlove(){
		boolean result = false;
		if (this.equals(Division.WHITE_GLOVE)){
			result = true;
		}
		return result;
	}
User avatar
GONNAFISTYA
Posts: 13369
Joined: Sun Jan 23, 2005 8:20 pm

Re: sigh...

Post by GONNAFISTYA »

function EatManCock()
SendMessageToForum (__this__, "FuckingNerd", __this__)
end

CreateInternetNerd (__this__,"EatManCock")
User avatar
Captain
Posts: 20410
Joined: Thu Jan 05, 2006 2:50 am

Re: sigh...

Post by Captain »

Code: Select all

      if (this.equals(Division.WHITE_POWER)){
         result = [LOL RACISM];
      }
      return result;
      } else {
         System.out.println("We cool dawg");
Fender
Posts: 5876
Joined: Sun Jan 14, 2001 8:00 am

Re: sigh...

Post by Fender »

Just in case anyone was wondering the "right" way to do it...

Code: Select all

public boolean isWhiteGlove() {
      return this == Division.WHITE_GLOVE;
}
Ryoki
Posts: 13460
Joined: Wed Aug 01, 2001 7:00 am

Re: sigh...

Post by Ryoki »

goddamn nerds :mad:
[size=85][color=#0080BF]io chiamo pinguini![/color][/size]
Fender
Posts: 5876
Joined: Sun Jan 14, 2001 8:00 am

Re: sigh...

Post by Fender »

goddamn incompetent nerds
Therac-25
Posts: 613
Joined: Sat Dec 04, 1999 8:00 am

Re: sigh...

Post by Therac-25 »

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;
}
eh? that does a different thing than the original function. == tests for object identity, .equals() for equality. unless that was the bug.
Fender
Posts: 5876
Joined: Sun Jan 14, 2001 8:00 am

Re: sigh...

Post by Fender »

The Division object is an Enum, so .equals() and == have the exact same behavior.
Locked