mdsk.net
当前位置:首页 >> jAvA输出希腊字母表 >>

jAvA输出希腊字母表

public class GreekAlphabet { public static void main (String args[ ]) { int startPosition=0,endPosition=0; char cStart='α',cEnd='ω'; startPosition=(int)cStart;// 【代码1】 cStart做int型转换据运算,并将结果赋值startPosition endP...

public static void printGreek() { int firstLetter, lastLetter; char firstG = 'α', lastG = 'ω'; //获取首字母与末字母的值 firstLetter = (int)firstG; lastLetter = (int)lastG; System.out.println("希腊字母表: "); for(int i = firstL...

import java.applet.*; import java.awt.*; public class myapplet extends Applet { public void paint(Graphics g) { String str=""; for(char a='α';a

public class GreekAlphabet { public static void main(String args[]) { int startPosition = 0, endPosition = 0; char cSrart = 'α', cEnd = 'ω'; startPosition = (int) cSrart; endPosition = (int) cEnd; System.out.println("希腊字母表...

public class GreekAlphabet { public static void main(String args[]) { int startPosition = 0, endPosition = 0; char cSrart = 'α', cEnd = 'ω'; startPosition = (int) cSrart; endPosition = (int) cEnd; System.out.println("希腊字母表...

public class P_xl{ public static void main(String[] args){ int i=945; for(;i

一共是24个希腊字母,你多出来的那个位置上应该没有内容。 我看网上有人这样做的循环,你看看适合你不: for(char a='α';a

大写字母对应的ASCII码值: 65~90 小写字母对应的ASCII码值: 97~122 键盘上的字符对应的ASCII码值表

public static void main(String[] args) { String str="ΑΒΓΔΕΖΗΘΙΚ∧ΜΝΞΟ∏Ρ∑ΤΥΦΧΨΩ"; char[]a=str.toCharArray(); for (int i = 0; i < a.length; i++) { System.out.print(a[i]+" "); if ((i+1)%5==0) { System.out.println(); } } }

char 类型只能放字符,加了空格就是字符串了,所以出错额

网站首页 | 网站地图
All rights reserved Powered by www.mdsk.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com