Untitled

Java online editor

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

Output