打印希腊字母

来源:互联网 发布:淘宝机械键盘 编辑:程序博客网 时间:2024/05/29 15:13
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. *//** * * @author lenovo */public class Print {        public static void main (String args[]){          int i;     char cStart='α',cEnd='ω';        int startPosition=(int) cStart;        int endPosition=(int) cEnd;        System.out.println("希腊字母α在unicode表中的顺序位置:"+startPosition);           System.out.println("希腊字母表:");        for(i=startPosition;i<=endPosition;i++){            char c='\0';            c=(char)i;            System.out.print(" "+c);            if((i-startPosition+1)%10==0)                System.out.println("");            }        }    }

0 0
原创粉丝点击