Java Blog

 
 
 
import java.io.*;

 public class JAVA_005
 {

    public static void 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);
          }
    }
 }

 
 
Didn't find what you were looking for? Find more on Program to read input from the Standard Input Device