package test;/* @author wb @great forever i think,therefor i am */ public class test { public test(boolean isUppperCase){ char start = isUppperCase? 'A':'a'; char end = isUppperCase? 'Z':'z'; while(start <= end){ System.out.print(start); start++; } System.out.println(); } public test(){ this(false); } public static void main(String[] args) { new test();//默认输出小写字目标 System.out.println(); new test(true);//大写就传参数true } }
输出英文字母
最新推荐文章于 2021-11-23 22:24:53 发布