Alex Rivera | Logout

"cannot find symbol - class Scanner" error

Asked 2011-05-11T03:56:52.627
13

This is my Code

public class Workshop3
{
    public static void main (String [] args)
    {
        System.out.println ("please enter radius of circle");
        double radius;
        Scanner keyboard = new Scanner (System.in);
        keyboard.nextDouble (radius);
    }
}

The error I recieve is

cannot find symbol - class scanner

on the line

Scanner keyboard = new Scanner (System.in);
Edit
Report

1 Answer

6

You have to import java.util.Scanner at first line in the code.

import java.util.Scanner;
answered 2011-05-11T04:00:11.207

Your Answer