Hey guys, I am trying to figure out how to write out this java Program, I am using JCreater, and I am teaching JAVA to my self if you guys can help and show me a couple of the programs that I am doing I think i will be all set, ive never seen any java coding in my life. and it dosen't seem to hard. since i have done a few programs by myself. alright here is my first program....

Using float types, set up a variable containing a fahrenheit temperature, then display the celsius equivalent. The formul is: c = (f - 32.0f) * 5.0f / 9.0f. I have only done 1 applet that is very basic i am having a tough time trying to picture how this should be coded and set up on the screen. and what is a float type?

You need to show some effort if asking for homework help. Post your current code and specific questions.

If you don't know what a float data type is, you need to read your book or a basic Java tutorial.

commented: no good work without a solid basis indeed .. +12

There are lots of basic java examples and definitions of a term on the web if you try to search
If you have problems in understanding or couldn't figure out an error in your code then you can ask here for help

Well after doing some research my book dosent really cover FLOAT, I think i have figured it out. and Ezzaral this is not for class i am trying to teach myself java BY MYSELF im just using a book for problems to use. I am in college,but i am not taking a java class.... here is what I got for a code. works to me hope its what the question is asking for.....

/**
 * @(#)week_two_number_four.java
 *
 * week_two_number_four Applet application
 *
 * @author Patrick Thompson
 * @version 1.00 2012/1/23
 * Description: Turns Fahrenhiet to Celsius.
 */
 
import java.awt.*;
import java.applet.*;

public class week_two_number_four extends Applet {
	
	public void init() 
	{
		
	}

	public void paint(Graphics g) {
		
		float FAHRENHIET = 70;
		float Celsius = (FAHRENHIET - 32.0f)*5.0f / 9.0f;
		g.drawString("If the Fahrenhiet or normal tempature is " + FAHRENHIET + " degrees", 50, 60 );
		g.drawString("Then it is " + Celsius + " degress Celsius.", 50, 85);
	}
}

also what is the public VOID init used for? is that where you can put your equations and junk.

Alright Thanks! that did help

Well after doing some research my book dosent really cover FLOAT, I think i have figured it out. and Ezzaral this is not for class i am trying to teach myself java BY MYSELF im just using a book for problems to use. I am in college,but i am not taking a java class....

well ... Ezzaral has an excellent point. even if you 're not a professional driver, but just drive a bit for fun, it comes in handy to know that your car has an engine and wheels.

especially if you are teaching yourself to program, the best thing to do is to start with the basics. after all, it won't be impressive if you can write a calculator in java, if you have no idea about the difference between a 'float' and a 'Float'.

if your book doesn't cover float, it's either a very crappy book, it's not intended to be used by those who have no prior experience with Java developing or it's sole purpose is to teach you how to develop the application it works toward to, without teaching you the language itself.

the first thread in this forum is a sticky containing tons of information on how to start learning java, with links (and reviews) of good books, tutorials, ... to get you on your way. going through that thread may help you as well.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.