JAVA/예제

[JAVA] ch03-15. 알파벳 증가 연산자

밍글링글링 2017. 8. 21.
728x90
 
public class Ex15 { //알파벳 증가연산자
    public static void main(String[] args){
        char c = 'a';
        for (int i = 0; i<26; i++) System.out.print(c++);
        System.out.println();
        //abcdefghijklmnopqrstuvwxyz
        c = 'A';
        for (int i = 0; i<26; i++) System.out.print(c++);
        System.out.println();
        //ABCDEFGHIJKLMNOPQRSTUVWXYZ
        c = '0';
        for (int i = 0; i<26; i++) System.out.print(c++);
        //0123456789:;<=>?@ABCDEFGHI
    }
}

728x90

댓글