DEV Community

Subash
Subash

Posted on

Finding Error in a simple "Hello World!" Program.

Above is the simple Hello Universe! program and we can see how the simple syntax error cause the program to fail to run.

1)If we remove the class name Home below error occurs

2)If we remove the class form the first line below error occurs

3)If we remove the semicolon from the output line below error occurs

4)If we remove the double quotation from the string Hey Universe below error occurs

5)If we put single quotation instead of double quotation in string below error may occurs

6)If we remove the main in psvm below error occurs

It ask for identifier expected...

7)If we remove void form public static void main(psvm) below error occurs

its asks for return type...

8)If we remove the System form the code below error occurs

9)If we remove the curly braces from psvm it shows the error below:

10)If we remove println form the output line below error occurs

Top comments (0)