import javax.swing.*;
public class Test
{
int num1,num2;
while(true)//illegal start of type
{
num1=Integer.parseInt(JOptionPane.showInputDialog("Enter a number please:"));
num2=Integer.parseInt(JOptionPane.showConfirmDialog("Enter another number please:"));
if(num2!=0&&num1/num2>=10)
System.out.println(num1/num2);
else
System.out.print("The result is less than 10!");}
}//<identifier> expected谢谢!!!
public class Test
{
int num1,num2;
while(true)//illegal start of type
{
num1=Integer.parseInt(JOptionPane.showInputDialog("Enter a number please:"));
num2=Integer.parseInt(JOptionPane.showConfirmDialog("Enter another number please:"));
if(num2!=0&&num1/num2>=10)
System.out.println(num1/num2);
else
System.out.print("The result is less than 10!");}
}//<identifier> expected谢谢!!!
public class Test
{
public static void main(String args[])
{
int num1,num2;
while(true)
{
num1=Integer.parseInt(JOptionPane.showInputDialog("Enter a number please:"));
num2=Integer.parseInt(JOptionPane.showConfirmDialog("Enter another number please:"));//cannot result symbol method showConfirmDialog(java.lang.String)
if(num2!=0&&num1/num2>=10)
System.out.println(num1/num2);
else
System.out.print("The result is less than 10!");
}
}
}
这是什么错误呀?谢谢!!
showConfirmDialog
改成
showInputDialog