+ 11
Int to String [Java]
Hey. for some reason i thought that this code would work can anyone explain whats wrong with it please. int i = 1000; System.out.println(""+i.charAt(1)); Thanks
5 Answers
+ 22
David, write :
System.out.println ((""+i).charAt(1)) ;
+ 21
š I know that you know. That's piece of cake for you... š
But for beginners this is an interesting question š
+ 7
@luka lol i knew that š thank you š
+ 4
wow, I've been wondering why so much emphasis is placed on order of operations & this question (& the solutions) brought the point home.
I usually just put my expressions in variables to avoid trouble, but i realize now that it's easy to do these kinds of computation without. Thanks guys :)