Вы находитесь на странице: 1из 1

1.

I received the error:


Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - illegal start of
expression
at helloworld.HelloWorld.main(HelloWorld.java:18)
Java Result: 1
2. I received this error asking me to redefine the main method:
Error: Main method not found in class helloworld.HelloWorld, please define the main method as:
public static void main(String[] args)
Java Result: 1
3. This caused the statements to appear on the same line.
4. When I removed the parenthesis after the Hello World statement, there was no error. However
when I removed the one preceding it, I received:
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - not a statement
at helloworld.HelloWorld.main(HelloWorld.java:19)
Java Result: 1
5. Adding a parenthesis after main gave the error:
Error: Main method not found in class helloworld.HelloWorld, please define the main method as:
public static void main(String[] args)
Java Result: 1

Вам также может понравиться