How can I fix this problem here:
Error:(8, 43) java: incompatible types: java.lang.String cannot be converted to int
My code:
import jdk.internal.util.xml.Input;
import java.util.*;
public class HelloWorld { //this is a comment
public static void main(String[], args) {
Scanner input = new Scanner(System.in);
System.out.println("Welcome");
int grade = input.nextLine();
if (grade > 60) {
System.out.println("Admited");
}
}
}
It says it requires an integer, but it found a string.