Somehow this code of mine is not working. Its giving me : error, cant find symbol celsius = Double.parseDouble(s); symbol: method parseDouble(String location: class Double
It's really weird because it works with Integer.parseInt, but not Double.parseDouble somehow?? Any suggestions?
class CelsiusTry{
public static void main(String[]args){
String s;
double celsius, fahrenheit;
s = JOptionPane.showInputDialog("Enter Celsius");
celsius = Double.parseDouble(s);
fahrenheit = celsius * 1.8 + 32;
JOptionPane.showMessageDialog(null, "Fahrenheit is: " + fahrenheit);
}
}