import java.util.Scanner;
public class a244 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scanner = new Scanner(System.in);
int a=0,b=0,c=0;
while(true) {
int n = scanner.nextInt();
int[] name=new int[n];
int[] line=new int[3];
for(int i=0;i<name.length;i++){
for(int j=0;j<line.length;j++) {
line[j]=scanner.nextInt();
a = line[0];
b = line[1];
c = line[2];
}
if(a==1)
System.out.println(b+c);
else if(a==2)
System.out.println(b-c);
else if(a==3)
System.out.println(b*c);
else if(a==4)
System.out.println(b/c);
else
break;
}
}
}
}
系統顯示int[] name=new int[n]; 這一行錯誤,我不知道要怎麼改,如果會java的大大麻煩幫我解惑一下,萬分感謝