package zuoye;
public class print1 {
String a="abcdefghigklmnopqrstuvwxyz";
String B="ABCDEFGHIGKLMNOPQRSTUVWXYZ";
int x;
void output()
{
if(x==1)
{
System.out.println("小写英文字母表:"+"《"+a+"》");
}
if(x==2)
{
System.out.println("大写英文字母表:"+"《"+B+"》");
}
}
}
package zuoye;
import java.util.Scanner;
public class TestClass1 {
public static void main(String[] args) {
print1 pt=new print1();
Scanner sc=new Scanner(System.in);
System.out.println("请输入1或2,打印英文字母表");
pt.x=sc.nextInt();
pt.output();
}
}