If you have ever written Java programs using Notepad or inside DOS editor, then you know that how a single curly brace can blow your program and throw 100s of error during compilation. I was one of those lucky people who started their programming on DOS editor, the blue window editor which allow you to write Java program. I didn't know about PATH, CLASSPATH, JDK, JVM, or JRE at that point. It's our lab computer where everything is supposed to work as much our instructor wants. Since we don't have the internet at that point of time, we either wait for the instructor to come and rescue us and we surprise how he solve the error by just putting one curly brace and all errors mysteriously go away. Today, I am going to tell you about one such error, "class, interface, or enum expected". This is another compile time error in Java which arises due to curly braces. Typically this error occurs when there is an additional curly brace at the end of the program.
Read more »