+ 4

I need a help

I don't know what troubles the compiler...may you please resolve them😊or suggest if anything which may help😊😊 https://code.sololearn.com/cE7W7TuWP1fZ/?ref=app

25th Mar 2021, 4:44 PM
𝑹𝒂𝒔𝒉𝒊🪷 - avatar
4 Answers
+ 3
I did not go through the code because there are more than few errors. This is how I would do it. https://code.sololearn.com/c8RLfmWp3331/?ref=app
25th Mar 2021, 5:47 PM
Avinesh - avatar
+ 6
Because of the empty character literal ' ': str2=str2+ ' ' Character.toUpperCase(str1.charAt(i+1)); In a String you can use " ". This will also not work: if(str1.charAt(i)=="") " " is an empty String, not a character. ' ' will not work but Character.isWhitespace(char c) does the job. if(Character.isWhitespace(str1.charAt(i))){ } But I guess your program has a logical problem.
25th Mar 2021, 5:41 PM
Denise Roßberg
Denise Roßberg - avatar
+ 5
Avinesh Denise Roßberg Thank you so much for helping me😊 Now I am confused that which answer shall I mark as the best😄
25th Mar 2021, 5:53 PM
𝑹𝒂𝒔𝒉𝒊🪷 - avatar
+ 2
Ooh gr8 mujhe to pta tk ni tha iske bare m😂
25th Mar 2021, 4:47 PM
💖R̆̈ĭ̈d̆̈d̆̈h̆̈ĭ̈m̆̈ă̈❤️ᵈᵐ🚫 - avatar