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

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

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: "); }


What is a brushless RC car system?

A brushless system for R/C cars is a engine system without brushes. No brushes equals faster car. brushes equal slower car.


Write a function that will accept a series of integer values in a list. Terminate sequence by typing -999. Then display the content of list.?

public static final void readIntList() { // set up our input buffer BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String currentLine; // I'll use a linked list for this; // replace it with whatever best suits your purpose List<Integer> intList = new LinkedList<Integer>(); // loop until we read -999 while (!(currentLine = in.readLine()).equals("-999")) { try { // convert from string to int int currentNumber = Integer.parseInt(currentLine); // add to the list intList.add(currentNumber); } catch (final NumberFormatException ex) { // we go here if the user didn't type in an integer } } // display our lovely list System.out.println(intList); }


3 ohms x 1k ohms x 25 ohms equals?

If the question means to indicate multiplication, then the product is 75,000 cubic ohms.This quantity has no physical meaning or significance.


Can high fired earthenware be used in the oven-action equals edit-dim1 equals wemissyou-dim2 equals EditA-src equals email?

-1

Related Questions

What is meaning for BufferedReader in 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