2

I've finished my first course in java at college and want to practice on my own computer.

However, after downloading eclipse and being able to write very simple programs, I hit a snag when I tried to write programs which take user input using e.g:

Keyboard.in.readInteger();

Because "Keyboard cannot be resolved".

I have used this successfully on lab computers, but how do I get it to accept my keyboard inputs?

Thank you B

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Bevan
  • 23
  • 2
  • Sounds like the Keyboard class was provided by your classroom environment? Google 'java keyboard input' for a bunch of samples. – Jim Garrison Mar 10 '11 at 02:56

1 Answers1

0

The classic examples of reading input from the keyboard don't involve a Keyboard class (like the Simple input from the keyboard from the Real's HowTo).

So your "Keyboard" class is likely to be a custom one, as illustrated by this cs1.Keyboard file (which at least don't give you direct public access to the InputStreamReader ;) ).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250