what does "reached end of file while parsing" mean? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what does "reached end of file while parsing" mean?

I added "if(age > 32) {" to the try it yourself in this section and I got "reached end of file while parsing" instead of "error" any idea why?

8th Oct 2016, 7:46 PM
WHITEHOOD
3 Answers
+ 3
that error means that you are missing a closing } bracket. Every time you open one for methods, loops, if blocks, etc. you must close it
8th Oct 2016, 8:29 PM
Michael McGaha
Michael McGaha - avatar
0
now im getting "welcome" instead of "error"
8th Oct 2016, 9:24 PM
WHITEHOOD
0
Every opening braces { needs one closing braces }. The only purpose of the extra braces is to provide scope-limit . If you put curly braces in the wrong places or omit curly braces where the braces should be, your program probably won't work at all. Moreover, If you don't indent lines of code in an informative manner , your program will still work correctly, but neither you nor any other programmer will be able to figure out what you were thinking when you wrote the code. The error Reached End of File While Parsing is a compiler error and almost always means that your curly parenthesis are not ending completely or maybe there could be extra parenthesis in the end. http://net-informations.com/java/err/reached.htm
22nd Nov 2019, 4:31 AM
rahul kumar
rahul kumar - avatar