Answers for "bufferead Java program to read integer data from the user"

3

how to read integer input using bufferedreader java

BufferedReader reader =new BufferedReader(new InputStreamReader(System.in));
int num = Integer.parseInt(reader.readLine());
Posted by: Guest on November-22-2020
0

BufferredReader Class

package com.javatpoint;  
import java.io.*;  
public class BufferedReaderExample{    
public static void main(String args[])throws Exception{             
    InputStreamReader r=new InputStreamReader(System.in);    
    BufferedReader br=new BufferedReader(r);            
    System.out.println("Enter your name");    
    String name=br.readLine();    
    System.out.println("Welcome "+name);    
}    
}
Posted by: Guest on October-09-2020

Code answers related to "bufferead Java program to read integer data from the user"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language