Hi.
Is throws java.io.IOException can be used together with char only?
How about int, String, long... ...
for example,
class ReadChar {
public static void print( long num )
throws java.io.IOException{
System.out.println( "Type a number and press [Enter]" );
num = (long)System.in.read();
System.out.println( "You typed " + num );
}
}
In this case, when I type 7, it stated I typed 55.
Why? Hope to get the answer soon.
Thank you.
