import cs1.Keyboard doesn't work
807597Sep 13 2001 — edited Jan 26 2005Please help I am writing my second program and I have been told
that 'Class cs1.keyboard not found in import' when I compiled it.
My code is....
import cs1.Keyboard;
public class three_int
{
public static void main (String[]args)
{
int a,b,c;
float average;
System.out.print ("Enter a number for a: ");
a = Keyboard.readInt();
System.out.print ("Enter a number for b: ");
b = Keyboard.readInt();
System.out.print ("Enter a number for c: ");
c = Keyboard.readInt();
average=(a+b+c)/3;
System.out.println ("The average of a,b and c
is " average".");
}
}
What am I doing wrong? My class path is right I'm fairly sure. Is it because I'm using different versions of SDK ?
I'm using SDK1.4 beta and SDK1.2.2, At University the cs1.Keyboard package works perfectly but when I downloaded it from the java website it didn't work.... Can you pls tell me the exact website I can get the version I can use to make cs1.Keyboard package work... Thank you. Your help is greatly appreciated.
Cheers, George