/*
Predictions
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
Scanner scanner = new Scanner(System.in);
String name = scanner.nextLine();
String number1 = scanner.nextLine();
String number2 = scanner.nextLine();
System.out.print("Nick will receive " + number1 + " in " + number2 + " years.");
}
}
com/codegym/task/task03/task0319/Solution.java:12: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class com.codegym.task.task03.task0319.Solution
What does this error mean?
Resolved
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
klesk
6 January 2020, 08:14solution
You have to import the Scanner class first
then you can use the class.
This error message states that the compiler can't find the Scanner class. +2