Ok got it . You have done the following mistakes :
1. You have not imported java.util package with Scanner class
2.You have to create an object of that Scanner class from java.util package
- nextLine() is the method from java.util.Scanner
import java.util.Scanner; //1
class Main
{
public static void main(String[]args) {
Scanner Input = new Scanner(System.in); //2
inPut = Input.nextLine();
}
}