如何用Eclipse3.1.1编写的Java版“九九乘法表”?

如何用Eclipse3.1.1编写的Java版“九九乘法表”?

public class Hello
{
public static void main(String args[])
{
//定义:直线zx 中间线zj 中间靠右线zy 2006.10.7 15:32
String zx="---------------------------------------------------------------------------------------------------";
String zj="|";
String zy =" |";
int a,b,total=0;
System.out.println(" 用JAVA语言编写的“九九乘法表” bytanjian 2006.10.7 15:40");
System.out.println();
System.out.println(zx);
for(a=1;a<=9;a++)
{
System.out.print(zj);
for(b=1;b<=9;b++)
{
total=a*b;
System.out.print(a+"*"+b+"="+total);
switch (a)
{
case 1:
if (b==1){System.out.print(zj);}else {System.out.print(zy);}
break;
case 2:
if (b==2 || b==3 || b==4){System.out.print(zy);}else {System.out.print(zj);}
break;
case 3:
if (b==2 || b==3){System.out.print(zy);}else {System.out.print(zj);}
break;
case 4:
if (b==2){System.out.print(zy);}else {System.out.print(zj);}
break;
default:
System.out.print(zj);
}
}
System.out.println();
System.out.println(zx);
}
System.out.println("输出完毕,欢迎访问我的Blog: http://blog.csdn.net/hhtanjian");
}
}