+ 1

Explain the working

i wrote a code in java and it is producing unexpected output the very first characters produced were my reaction during the execution of program https://code.sololearn.com/cmVarHpQJey0/?ref=app

11th Oct 2017, 3:00 AM
pallavraj5
pallavraj5 - avatar
5 Answers
+ 1
When you add the chars you make a sum of their ascii code and in the loop you increment the ascii code. If you want to concatenate the chars you should use java.lang.String instead of char
11th Oct 2017, 3:36 AM
bogdan
bogdan - avatar
+ 1
the only character that is reappearing is '?'. Probably because the program doesn't known what to print
12th Oct 2017, 9:18 AM
bogdan
bogdan - avatar
0
thanks bodgan
11th Oct 2017, 9:33 AM
pallavraj5
pallavraj5 - avatar
0
but there are multiple similar characters , why?
11th Oct 2017, 9:47 AM
pallavraj5
pallavraj5 - avatar
0
@bodgan tnx
12th Oct 2017, 9:51 AM
pallavraj5
pallavraj5 - avatar