Computer Science Canada JAVA user input |
Author: | Darkshining [ Mon Jan 23, 2006 7:35 pm ] |
Post subject: | JAVA user input |
Umm.. Extremely new to JAVA how can i write a program that ask for input on the temperature of water and see if it's below 0. if it is, then say water is frozen, if not say water is water.. thanks a ton |
Author: | Martin [ Mon Jan 23, 2006 7:45 pm ] |
Post subject: | |
http://www.google.com/search?q=java+tutorial&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official |
Author: | turboliux [ Tue Jan 24, 2006 1:21 pm ] | ||||
Post subject: | |||||
this one takes input from user and gives the square of it
btw, if you dont know about "if" statements, then read this example:
the string message becomes "its ok!" |
Author: | turboliux [ Thu Jan 26, 2006 11:04 am ] |
Post subject: | |
note: the message becomes "awesome!", not "its ok!" ![]() ![]() |
Author: | [Gandalf] [ Fri Jan 27, 2006 7:18 pm ] |
Post subject: | |
Look up the Scanner class for the best way to do it. I was in the process of making a tutorial of input using the Scanner class a while ago, but never got around to finishing it... Maybe after exams. |