answersLogoWhite

0

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

This line will create a new BufferedReader object, which reads from System.in (standard input). The InputStreamReader part is used to convert System.in (which is an InputStream) to a Reader object (which can be used by BufferedReader).

After creating br, you can read input from the user:

String input = br.readLine();

The line above will allow the user to type in anything they want, press the button, and have what they typed in stored in input.

User Avatar

Pamela Ferry

Lvl 10
3y ago

What else can I help you with?

Related Questions

What is meaning for BufferedReader br equals new BufferedReader new InputStreamReade System in?

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));This line will create a new BufferedReader object, which reads from System.in (standard input). The InputStreamReader part is used to convert System.in (which is an InputStream) to a Reader object (which can be used by BufferedReader).After creating br, you can read input from the user:String input = br.readLine();The line above will allow the user to type in anything they want, press the button, and have what they typed in stored in input.


How do you write a program that takes a list of all positive integers from input and counts as the integers are input?

// create an BufferedReader from the standard input stream BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String currentLine = ""; int total = 0; // read integers System.out.print("Input an integer: "); while (!(currentLine = in.readLine()).equals("")) { int input = 0; try { input = Integer.valueOf(currentLine); total += input; } catch (final NumberFormatException ex) { System.out.println("That was not an integer."); } System.out.print("Input an integer: "); }


9x-3y equals 24 y equals 3x-8 the system?

The system is simultaneous linear equations


When does the change in entropy equal zero?

The change in entropy equals zero when a process is reversible, meaning that the system and surroundings return to their original state without any net change in entropy.


What time what equals 7?

7 multiplied by 1 equals 7. Seven is a prime number meaning only the number times one equals the number.


What are two meanings for 12 equals S of the Z?

One possible meaning is that 12 equals "S" sides of the zodiac, referring to the 12 signs in the zodiac. Another interpretation could be that 12 represents the 12 symbols or constellations in the zodiac system.


What is the meaning of primus inter pares?

It means the "first among equals"


What is the meaning of dividend in mathematics?

The answer is something that is divided by something equals the dividend


What is the meaning when the probability of the event equals 0?

It's unlikely to happen


What is the riddle meaning of 1 plus 6Z equals 1M?

1 plus 6 zeroes equals 1 million (1,000,000).


The system of equations 3x-6y equals 20 and 2x-4y equals 3 is?

the system of equations 3x-6y=20 and 2x-4y =3 is?Well its inconsistent.


When k is Eliminated in the system 5j-k equals 17j plus 3k equals 3 what values of j and k will satisfy the system?

j=-3 and k=2