Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 15, 2004, 02:32 PM   #1
TurboLag
macrumors member
 
Join Date: Feb 2004
BlueJ: cannot resolve symbol - class Scanner

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?
TurboLag is offline   0 Reply With Quote
Old Oct 15, 2004, 09:44 PM   #2
iMeowbot
macrumors 601
 
iMeowbot's Avatar
 
Join Date: Aug 2003
Isn't Scanner a JDK 1.5 thing? Apple haven't made that version of the JDK available to the general public yet.
iMeowbot is offline   0 Reply With Quote
Old Oct 16, 2004, 11:51 AM   #3
TurboLag
Thread Starter
macrumors member
 
Join Date: Feb 2004
How could I implement this program with the currenct JDK?
TurboLag is offline   0 Reply With Quote
Old Oct 16, 2004, 11:59 AM   #4
stoid
macrumors 68040
 
stoid's Avatar
 
Join Date: Feb 2002
Location: So long, and thanks for all the fish!
Quote:
Originally Posted by TurboLag
How could I implement this program with the currenct JDK?
Code:
try{
    BufferedReader kbr = new BufferedReader( new InputStreamReader( System.in) );
    String userInput = kbr.readLine();
    //process userInput
} catch {(IOException e) {
    System.out.println("IO Error: " + e );
}
stoid is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
iPhone: Battery symbol overlaping the switch camera symbol. becast Jailbreaks and iOS Hacks 4 Feb 7, 2014 07:46 PM
Referencing a child class in a parent class, good or bad? SAIRUS iPhone/iPad Programming 11 Aug 28, 2013 11:59 AM
BlueJ eric/ Mac Programming 2 Feb 2, 2013 12:44 PM
Difference between Public class and private class. zijianz iPhone/iPad Programming 4 Jun 29, 2012 09:29 PM

Forum Jump

All times are GMT -5. The time now is 12:28 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC