0
Why is there an error when I concatenate a String var with a char to form a new String and this char belongs to another String?
String S = ""; String name = "Julián"; S = S + name[1];
3 ответов
+ 2
Which language? Tag the language pls...
Edit: Adriel
In java, you should use charAt method to access charecters in a string.
S= S+ S.charAt(1);
name[1] means name array value at index 1.
0
Thanks, Jayakrishna. I forgot to specify the language but you managed to know it. Thanks again. I'm moving to Java from Delphi. In order to vote positively for your answer I have to check the inscription on mail, but I don't see the mail sent from SoloLearn. Do I have to activate PRO version?
0
Adriel no.
check your spam folder in your mail.. if not found, just edit mail in settings and save.(edit to remove a char and save. again save to correct original mail). You get mail again...
(Am also not verified but it works sure).