I need a help | Sololearn: Learn to code for FREE!


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

4 Answers

New Answer


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


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.


Avinesh Denise Roßberg Thank you so much for helping me😊 Now I am confused that which answer shall I mark as the bestπŸ˜„