If you don’t add the ‘static’ modifier in your main method definition, the compilation of the program will go through without any issues but when you’ll try to execute it, a “NoSuchMethodError” error will be thrown.
Shathana. S.R. Answered question
Not a member yet? Register now
Are you a member? Login now