编写一个名为Input的类,该类属于cn.zjxu.java.tools包。使用 该类实现各种数据类型数据输入,
其中的方法有readInt()、readDouble()、readString()等。
在用户程序中调用Input.readXxx()即可从键盘上输入xxx型数据。
【输入形式】
Please input a byte value:-128
b=-128
Please input a int value:123
i=123
Please input a long value:123456789
l=123456789
Please input a float value:1.23456
f=1.23456
Please input a boolean value:false
bl=false
Please input a String value:helloscanner
s=helloscanner
使用
instanceof
判断对象所属类型