In my code, I\'m asking the user to input three different values divided by a blank space. Then, those three different values I would like to assign them to three different
Get the input, split it by a whitespace and parse each Double. This code does not sanitize the input.
String input = "12.4 19.8776 23.3445"; String[] split = input.split(" "); for(String s : split) { System.out.println(Double.parseDouble(s)); }