Take different values from a String and convert them to Double Values

后端 未结 5 695
孤街浪徒
孤街浪徒 2021-01-27 09:10

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

5条回答
  •  抹茶落季
    2021-01-27 09:42

    Double#parseDouble(str) expects a string,and you are trying to pass a character.

    try this:

    newHeight = Double.parseDouble(newDimensions.subString(1));
    

提交回复
热议问题