I'm really new to Java programming, so this is a simple question I guess.
I need to write a program that gets as an input the height and weight of a person as one string in which the height and weight separated by white space, for example: 1.68 70
and it calculates and prints the BMI (calculation by the formula weight/height^2).
I read on the internet that getting input from the user can be done by the Scanner class, and that's what I used. Now I want to save the height and weight in different variables so I can convert them from string to Double, but I don't know how to do it as the whole input is one string . I'm used to Python and slicing :( .. Please help? Thanks a lot.