+ 2
public class Hello World { public static void main(String [ ] args ) } { System.out.println ("Hello World");
what is the error in this code
8 Answers
+ 28
so many errors
1)there must be no gap in class name
2)where is the opening & closing bracket of main method
3)print statement is out of main method & main method is out of bracket of class bracket
//corrected code đ
public class Hello_World {
public static void main(String [ ] args ){
System.out.println ("Hello World"); }
}
+ 5
public class HelloWorld{
public static void main(String [] args ){
System.out.println("Hello World");
}
}
Like the other guys said no gaps in the class and put your system.out.println inside of the main method.
+ 2
can explain in normal way because I am a amateur
+ 1
can you tell me
0
Hello world
Hello java
0
Hello, World
Hello,Java