java example code hello world
Example 1: java hello world
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
Example 2: Hello World in Java
public class className{
public static void main(String[] args){
System.out.println("Hello World"); // println brings into a new line and print doen't
}
}