0
Why this java program is not giving any output?[Solved]
Hi, I just created this code that is supposed to convert a int into char and just give me the result. But it's not showing anything. I know it must be giving some output atleast because otherwise SoloLearn would say "No output." But that's not the case, then what is the problem? Please help. https://code.sololearn.com/cS6lR2LX9sGB/?ref=app
4 Respuestas
+ 4
because charcodes from 1 to 26 are not printable characters...
to print letters you must use:
System.out.println((char)(i+64));
or:
System.out.println((char)(i+96));
former print uppercase letters, while later print lowercase letters ;)
+ 2
The first charcode that will give a visible output is 33.
Try
for(int i=33;i<=127;i+=2)
+ 2
visph Thank you very much!
+ 2
ChaoticDawg Thank you!