Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. boolean done = false;
  2. while(!done)
  3. {
  4. System.put.println(“Enter value, Q to quit”);
  5. String input = in.next();
  6. if(input.equalsIgnoreCase(“Q”))
  7. done = true;
  8. else
  9. {
  10. double x = Double.parseDouble(input); //Converts the string to number
  11. data.add(x);
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement