hello world java

Java
public static void main(String[] args){
  System.out.println("Hello World");
}class Main {

    private String string = "Hello World!";

    public static void main(String[] args) {
        Main main = new Main();
        main.helloWorld();
    }

    public void helloWorld(){
        System.out.println(this.getHelloWorld());
    }

    public String getHelloWorld(){
        return this.string;
    }

}class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}class Simple{  
    public static void main(String args[]){  
     System.out.println("Hello Java");  
    }  
}  public class HelloWorld{

     public static void main(String []args){
        System.out.println("Hello World");
     }
}public class Main {

  public static void main(String[] args) {
  	System.out.println("Hello, World!"); 
  }
  
}
Source

Also in Java: