1public class HelloWorld {
2 public static void main(String []args) {
3 /* println() function to write Hello, World! */
4 System.out.println("Hello, World!");
5 }
6}
1public class HelloWorld{
2 public static void main(String []args){
3 System.out.println("Hello World");
4 }
5}
1class main {
2 public static void main(String[] args) {
3 System.out.println("Hello World!");
4 }
5}
6
1class HelloWorld {
2 public static void main(String[] args) {
3 System.out.println("shart");
4 }
5}
1// This is just a line of code, but publilc class.... is needed!
2 System.out.println("This will be printed");