Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Java Temperature Converter
Name: jarvio678 Date: August 11, 2005 at 03:21:30 Pacific OS: Win XP CPU/Ram: AMD Athlon XP - 1Gb RAM
Comment:
Hi, I've worked on doing an application in java to convert celsius to fahrenheit and visa-versa but it's not compiling and i can't seem to solve the errors. If anyone has a chance to take a look here's the code: It comes in 2 parts.. 1 class with the equation and 1 class to control the user input: 1st Class:
String input = JOptionPane.showInputDialog(null, "Enter which temperature you wish to convert using C or F:"); String temp = String.parseString(input); {
if(temp.equals("C"));
String input1 = JOptionPane.showInputDialog(null, "Enter Temperature in Centigrade to convert:"); float centigrade = Equation.convertF(input1);
{
if(temp.equals("F"));
String input2 = JOptionPane.showInputDialog(null, "Enter Temperature in Fahrenheit to convert:"); float fahrenheit = Equation.convertC(input2); } } }
Summary: that site didnt help very much after all i guess i have no clue when it comes to java so i am just going to ask what to do. Here is what i have: <form name=currencycounter> Enter the U.S. dollar am...
Summary: I created a method for adding complex numbers that should return a value of type NameOfaClass. I also have two instance variables declared of type double (real and imaginary). The method is called fro...
Summary: My mistake. The Java is converted into bytecode then interpreted by some means such as a JIT compiler to be executed by the VM. I think that's right...correct me if I'm wrong. - Rolos ...