Save the day

Report a typo

Your buddy from Java community wrote the basic Java program that should print Hello World. However, their code resulted in errors:

Find and fix the error in the code below and then click Run (or Check if you use an IDE). Our server will verify whether the program has become correct and will tell you the result.

Sample Input 1:

Hello World

Sample Output 1:

Hello World
Write a program in Java 17
public class Main {
public static void main(String[] args) {
String greetings = 'Hello World';
System.out.println(greetings);
}
}
___

Create a free account to access the full topic