File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Inverting number on drjava Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Inverting number on drjava" Watch "Inverting number on drjava" New topic

Inverting number on drjava

Justine Furlong

Joined: Jan 20, 2013
Posts: 1
I'm taking my first introductory course on computer science and we went over converting Fahrenheit to Celsius.

The above is my code, but I'm getting bunch of errors...I have no idea what I'm doing. Any help would be greatly appreciated.--
Anayonkar Shivalkar

Joined: Dec 08, 2010
Posts: 1545

Hi Justine,

Welcome to CodeRanch!

Please, TellTheDetails(<-click). Can you please provide more details about what errors are you facing? I found a couple of compilation errors when I copy-pasted your code:
1) degreesInFahrenheit is int and 32.0 is double. You need to make sure that datatypes are same during subtraction.
2) Strangely, the minus sign gave me another error - it looks like some other character than minus sign.

Apart from this, let us know if you face any other issues.

Also, please UseCodeTags(<-click). Code tags can be added by using 'Code' button during writing the post. I've added those for you this time.

Anayonkar Shivalkar (SCJP, SCWCD, OCMJD, OCEEJBD)
I agree. Here's the link:
subject: Inverting number on drjava
It's not a secret anymore!