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?
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
0
now im getting "welcome" instead of "error"
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