case 2:System.out.print("two,");
default:System.out.println("default");
}
}
}
4.public class MultiplyList{
public static void main(String[]args){
String output="";
blabel:for(int row=1;row<=9;row++){
for(int col=row;col<=9;col++){
if(row<8)continue blabel;
output+=col+"*"+row+"="+(row*col)+"";
}
output+="\n";
}
System.out.println(output);
System.exit(0);
}
}
5.public class Koo{
public static void main(String args[]){
int i=0,sum=0;
int[]anArray=new int[5];
while(i anArray[i]=5-i; System.out.print(anArray[i]+“”); i++; } System.out.println(); } } 6.public class CatchTest{ public static void main(String args[]){ int[]x={0,1,2,3}; for(int i=0;i<3;i+=2){ try{ System.out.println(x[i+2]/x[i]+x[i+1]); }catch(ArithmeticException e){ System.out.println(“error1”); }catch(Exception e){