A Java Program to read input from the Standard Input Device.
import java.io.*; publicclass JAVA_005 { publicstaticvoid main(String[] args) { DataInputStream Input=new DataInputStream(System.in); String N; String Str; try { System.out.println("Enter an integer value : "); N=Input.readLine( ); System.out.println("Enter a string value : "); Str=Input.readLine( ); int n=Integer.parseInt(N); System.out.println("\nThe integer value is : " + n); System.out.println("\nThe string value is : " + Str); } catch(IOException e) { System.err.println(e); } } }