Common Runtime Error Solution
Notice how the class is called “Jollymessage” whereas the filename is called “JollyMessage.java”.
It's important to remember that Java is case sensitive. The compiler won’t complain because technically there is nothing wrong with the code. It will create a class file that matches the class name exactly (i.e., Jollymessage.class). When you come to run the program called JollyMessage, you can't because there is no file called JollyMessage.class.
The error you get when you try and run a program with the wrong name is:
Exception in thread “main” java.lang.NoClassDefFoundError: JollyMessage (wrong name: JollyMessage)..
Happily it’s a simple fix, just change the class name so that it matches the file name (or vice versa).

