java 打印26英文字母

每个字符都有对应对应的Unicode 值 ,Unicode把所有的字符都用一串数字表示

public class demo01 {
    public static void main(String[] args) throws InterruptedException {
        t02 t02 = new t02();
       new Thread(t02).start();
    }
}
class t02 implements Runnable{
//打印26字母
    char a='A';
    @Override
    public void run() {
        for (int i = 0; i < 26; i++) {
            System.out.println(a);
            a++;
        }
    }
}

 

posted on 2023-02-15 18:05  小白药  阅读(90)  评论(0)    收藏  举报

导航