Java - compilation errors using Scanner
java
Solution
You need to name your class something other than `Scanner`. That name is already taken by `java.util.Scanner`, and creating a new class with that name is confusing the compiler.
Alternatively, you could try specifying:
java.util.Scanner sc = new java.util.Scanner(System.in);
so that your code is unambiguous.
Problem
This is my current class: ``` package Mathias; import java.util.*; public class Scanner { public static void main(String args[]) { System.out.print("What's your name?"); Scanner sc = new Scanner(System.in); String Input = sc.nextLine(); System.out.println("Hello, " + Input + "."); } } ``` I get two errors on the 5th & 6th lines. Error 1 http://puu.sh/64VGk.jpg Error 2 http://puu.sh/64VHe.jpg