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 } }
输出英文字母
猜你喜欢
转载自blog.csdn.net/CSDNwbdream/article/details/83655031
今日推荐
周排行