Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

The following code does not run on this compiler

0 votes
asked Feb 26, 2020 by anonymous

As we run a c++ program on this compiler. Java program does not simply run here since we can not create a file online on this compiler.

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

2 Answers

+1 vote
answered Feb 26, 2020 by Admin (5,100 points)
Try using "Main" class name instead of "MyClass"
+1 vote
answered Feb 27, 2020 by anonymous
public class Main {
  public static void main(String[] args) {
    System.out.println("Hello World");
  }
}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...