+ 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 :)