Keyboard Input

The "type.lang.IO" class provides a number of static methods to input data from the keyboard: such as IO.readInt(), IO.readDouble(), IO.readLine(). KeyboardByType.java provides an example of using type.lang.IO to read in a string, an integer, and a double.

The "java.io" package also provides ways to input data from keyboard. KeyboardInput.java is an example of using java.io classes to read a string, an integer and a double from the keyboard. Don't forget to have "throws IOexception" in the "main" method.

File Input

The "type.lang.UniReader" class can be used to read data from files. FileByType.java provides an example of using type.lang.UniReader to read and print the contents of a data file, called input.data

The "java.io" package also provides ways to input data from files. FileInput.java is an example of using java.io classes to read and print the contents of a data file, called input.data Don't forget to have "throws IOexception" in the "main" method.


Last Updated: 01/31/2003