The import "java.util.scanner" is not vaild
807601Feb 11 2008 — edited Feb 11 2008I am experiment with the java.util.scanner API after compiling the code below I received the following error:
The import "java.util.Scanner" is not valid, since it does not name a type in a package.
I declared a string variable should that suffice?
import java.util.Scanner;
public class Echo {
public static void main (String[] args)
{
String message;
Scanner scan = new Scanner (System.in);
System.out.println ("enter something:");
message = scan.nextLine();
System.out.println ("hey you entered: \"" + message + "\"");
}
}