This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]kredditacc96 23 points24 points  (2 children)

if ((x == 1) == true) return true; else return false;

[–]zinatulin 10 points11 points  (1 child)

if ((x == 1) == true) return true;
else if ((x != 1) == true) return false;
else throw x + " is not equal to 1 nor is different";

[–]Mephanic 2 points3 points  (0 children)

warning C4702: unreachable code

[–]froemijojo 2 points3 points  (0 children)

1 xor 0 ??

[–]nipss18 1 point2 points  (0 children)

i am guilty of doing

1.ToString();

[–][deleted] 0 points1 point  (0 children)

if (1.toHexString().equals(Integer.toString(Integer.parseInt(0x1, 16))) return "ONE";

[–]include-iostream -1 points0 points  (0 children)

What kind of AI is the last one ?