PDA

View Full Version : BlueJ: cannot resolve symbol - class Scanner




TurboLag
Oct 15, 2004, 02:32 PM
Im trying to compile a simple program in BlueJ 2.01 and I get this error: cannot resolve symbol - class Scanner

//Program:
import java.util.Scanner;
import java.text.NumberFormat;

public class Deli
{
public static void main (String[] args)
{
final double OUNCES_PER_POUND = 16.0;

double pricePerPound;
double weightOunces;
double weight;
double totalPrice;

Scanner scan = new Scanner(System.in);

and so on...


Am I missing a library package?



iMeowbot
Oct 15, 2004, 09:44 PM
Isn't Scanner a JDK 1.5 thing? Apple haven't made that version of the JDK available to the general public yet.

TurboLag
Oct 16, 2004, 11:51 AM
How could I implement this program with the currenct JDK?

stoid
Oct 16, 2004, 11:59 AM
How could I implement this program with the currenct JDK?


try{
BufferedReader kbr = new BufferedReader( new InputStreamReader( System.in) );
String userInput = kbr.readLine();
//process userInput
} catch {(IOException e) {
System.out.println("IO Error: " + e );
}