package lianxi; public class Print_1 { int x; Print_1(int x) { this.x = x; } void outPut() { String a = "abcdefghijklmnopqrstuvwxyz"; if (x == 1) { System.out.println(a.toUpperCase()); } else if (x == 2) { System.out.println(a); } else { System.out.println("不可执行"); } } public static void main(String[] args) { Print_1 Print1 = new Print_1(1); Print1.outPut(); Print_1 Print2 = new Print_1(2); Print2.outPut(); Print_1 Print3 = new Print_1(3); Print3.outPut(); } }