更新时间:2022-10-20 19:30:28
从键盘读取输入的经典示例不涉及Keyboard类(例如键盘上的简单输入, Real's HowTo )。
所以你的code键盘类可能是一个自定义类,如这个 cs1.Keyboard 文件(至少不让你直接访问 InputStreamReader
;))。
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
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
;) ).