Why I want to beat Java with a stick

int x = 100;
Stuff.doStuff(x);

The method doStuff(String) in the type Stuff is not applicable for the arguments (int)

int x = 100;
Stuff.doStuff(x.toString());

Cannot invoke toString() on the primitive type int

int x = 100;
Stuff.doStuff((String)x);

Cannot cast from int to String

int x = 100;
Stuff.doStuff(new Integer(x).toString());   // OMGWTFGRRRBBQ!!!

BUILD SUCCESSFUL

3 thoughts on “Why I want to beat Java with a stick

Leave a Reply