View Single Post
  #1 (permalink)  
Old 10-08-2008, 06:45 AM
RavenNevarmore's Avatar
RavenNevarmore RavenNevarmore is offline
Member
 
Join Date: Oct 2008
Posts: 2
RavenNevarmore is on a distinguished road
Send a message via Skype™ to RavenNevarmore
Error Message in JBuilder
Alright, so I'm pretty new here and new to Java, and I'm sitting here working on my homework and I think that I've got the code correct, but I keep getting this error on my program:

Exception in thread "main" java.lang.Error: Unresolved compilation problems:

The Program itself looks like this:

Code:
import javax.swing.JOptionPane; public class study2 { public static void main(String[] args) { String temp1 , temp2; int num1 , num2, max = 0; String choice=""; do{ JOptionPane.showInputDialog("The First Number is:"); num1 = Integer.parseInt(temp1); JOptionPane.showInputDialog("The Second Number is:"); num2 = Integer.parseInt(temp2); if (num1 > num2) max = num1; else max = num2; JOptionPane.showMessageDialog(null,"The Maximum is" +max); JOptionPane.showInputDialog(null, "Would you like to continue?: "); } while (choice.equals("yes")||choice.equals("Yes")); } }


I would immensely appreciate any help on this error, or how to fix whatever I did wrong.

Last edited by RavenNevarmore : 10-08-2008 at 06:58 AM.
Reply With Quote
Sponsored Links