What's wrong?

Report a typo

Given a program that reads one number and outputs it incremented by one.


Now the program cannot compile.

Fix all compile-time errors as well as logic-errors.

Sample Input 1:

10

Sample Output 1:

11
Write a program in Java 17
port java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);

int number = scanner.nextInt();

System.out.println(nextInt);
}
}
___

Create a free account to access the full topic