編寫Java應用程序?
class Print{void output(int x){if(x==1){for(int j=65;j<=90;j++)System.out.printf("%c ",j);System.out.println();}else if(x==2){for(int j=97;j<=122;j++)System.out.printf("%c ",j);System.out.println();}}}public class TestClass{ public static void main(String args[]){Print p=new Print();p.output(1);p.output(2); } } public static void main(String args[]){Cat cat=new Cat