Compiling this from the command line:
Code:
import java.util.Scanner;
public class test1 {
public static void main(String[] args) {
Scanner sc = new Scanner();
}
}
gives me this:
Code:
test1.java:5: cannot find symbol
symbol : constructor Scanner()
location: class java.util.Scanner
Scanner sc = new Scanner();
^
1 error
In eclipse:
Code:
The import java.util.Scanner cannot be resolved.
Scanner cannot be resolved to a type.
and in geany:
Code:
cannot find symbol
symbol: constructor Scanner()
location: class java.util.Scanner
Scanner sc = new Scanner();
^
I used the suggested method to reinstall java before posting this.
Thanks for all the help. I'm really hoping that I'm just making some stupid mistake that is easy and quick to fix...
Bookmarks