0
Whatâs wrong with my code?
Anyone know why I get 3 error messages not allowing my code to run properly? I directly copied and pasted from my book and Iâve been doing that and itâs worked up until this piece of code class LowerToUpper { public static void main(String args[]) { char smallLetter, bigLetter; smallLetter = âbâ; bigLetter = Character.toUpperCase(smallLetter); System.out.println(bigLetter); } }
2 Answers
+ 2
A common problem that came from copy/paste code, where some invalid characters (looking like spaces) accidentally copied over, and preventing the compiler from processing the code.
Remove and retype this whole line
smallLetter = 'b';
Lucky you it was just one line poisoned by invalid characters. Sometimes such characters spreads a whole code.
Anyways, please note the use of tags on your future posts. We are expected to put relevant words in posts' tags ...
https://code.sololearn.com/W3uiji9X28C1/?ref=app
+ 1
I had a feeling that was the problem but i forgot to check. Thanks for your help. I should have Relevant tags but i didnt know what to write i just needed help real quick. Thanks again , God bless you đđđ