I am new to java programming. I kept getting this problem cannot resolve symbol. I really don't know what went wrong. I am using J2SE SDK 1.5 and jGRASP 1.8.3. The code are below. Hope I can get a reply ASAP. Thanks..
1 import java.util.Scanner;
2
3 publicclass Pay
4 {
5 publicstaticvoid main(String[] args)
6 {
7 finaldouble TRANSPORT_ALLOWANCE = 50;
8 double hrRate;
9 int hrsWorked;
10 double pay;
11
12 Scanner scn = new Scanner(System.in);
13
14 System.out.print("Enter the hourly rate: ");
15 hrRate = scn.nextDouble();
16
17 System.out.print("Enter the number of hours worked: ");
18 hrsWorked = scn.nextInt();
19
20
21 pay = hrRate * hrsWorked + TRANSPORT_ALLOWANCE;
22
23 System.out.println ("Pay: " + pay);
24 }
25 }
¼§Pay.java:1: cannot resolve symbol
§symbol : class Scanner
§location: package util
§import java.util.Scanner;
§ ^
¼§Pay.java:12: cannot resolve symbol
§symbol : class Scanner
§location: class Pay
§ Scanner scn = new Scanner(System.in);
§ ^
¼§Pay.java:12: cannot resolve symbol
§symbol : class Scanner
§location: class Pay
§ Scanner scn = new Scanner(System.in);
§ ^
§3 errors
§