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