Results 1 to 4 of 4
Thread: Need answer asap!!!
- 07-07-2009, 08:56 AM #1
Member
- Join Date
- Jul 2009
- Posts
- 1
- Rep Power
- 0
Need answer asap!!!
Hi All,
I'm a beginner in java. I tried program that i code and compile it, the process of compilition is okay but no output are produced.
could you all help me with this. Here's the source code that i tried :
import javax.swing.*;
public class Test {
public static void main(String[] args) {
String ans;
ans = JOptionPane.showInputDialog(null, "Speed in miles per hour?");
double mph = Double.parseDouble(ans);
double kph = 1.621 * mph;
JOptionPane.showMessageDialog(null, "KPH = " + kph);
System.exit(0);
}
}
- 07-07-2009, 09:06 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,547
- Rep Power
- 11
That looks OK. What does happen when you run it?
Make sure you are running the same code you are compiling!
- 07-07-2009, 09:17 AM #3
Senior Member
- Join Date
- Dec 2008
- Location
- Hong Kong
- Posts
- 473
- Rep Power
- 5
will the popup pane hide by other windows?
- 07-07-2009, 09:48 AM #4
Similar Threads
-
problems with java code! (very new - need help asap!)
By sumkindafreek in forum New To JavaReplies: 1Last Post: 01-07-2009, 05:00 AM -
[SOLVED] Threads Help, I think? Please Help ASAP!
By tornado in forum New To JavaReplies: 1Last Post: 11-30-2008, 04:33 AM -
i want my answer to a whole number or i think an int, please help?
By soc86 in forum New To JavaReplies: 3Last Post: 11-02-2008, 01:29 AM -
Need Java Help ASAP
By L-dog in forum New To JavaReplies: 22Last Post: 10-02-2008, 11:54 PM -
array problems need your help ASAP!
By notherand in forum New To JavaReplies: 1Last Post: 06-29-2008, 08:59 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks