Read method: – The read method used in java programming using keyword readLine. This method invoked using an object of the class DataInputStream. This method input data from keyboard as a string which is then converted to the corresponding data type. Using the data type wrapper classes. If data input from keyboard, try and catch keywords handle any errors that might during the reading process. Data can be input from keyboard only when import statement used with java source program.

Advertisements