Scanner.next() return a string that contains a string "10,5".
How could I get these 2 int values into 2 different int variables?
Solution using Java 8:
String data = "10,5";
int[] numbers = Arrays.asList(data.split(",")).stream()
.map(String::trim)
.mapToInt(Integer::parseInt).toArray();