how do I convert a string number inputted w/JOptionPane.showInputDialog into a double? String rate; double hrRate; rate = JOptionPane.showInputDialog("Enter hourly rate:");
mommy6 1st you're going to have to change your name to comply with the naming rules of the ranch. http://www.javaranch.com/name.jsp 2nd to convert your string to a double use the parseDouble() mehtod from the Double class. Something like this should do it for you: