The following program snippet is used for inputting one integer, one double value
from keyboard using StreamReaders. Fill in the blanks with the proper statements.
import ______________;
public class Reader
{
public static void main(String[]args) _____________________
{
InputStreamReader read = new InputStreamReader(_____________);
BufferedReader in=new ________________________;
int n;
String s;
System.out.println(“Enter an integer number and your name”);
n=________________________________;
s=_________________________________;
}
}
please help
Answers
Answered by
6
import java.io.*;
public class Reader {
public static void main(String[ ] args) throws IOException {
InputStreamReader read = new InputStreamReader(System.in);
BufferedReader in = new BufferedReader(read);
int n;
String s;
System.out.println("Enter an integer number and your name");
n = Integer.parseInt(in.readLine());
s = in.readLine();
}
}
Similar questions