重写java课程学习二:编写程序
来源:互联网 发布:java多线程实现三方式 编辑:程序博客网 时间:2024/06/08 13:18
1.写出“你”,“我”,“他”在unicode表中的位置。public class E{public static void main(String args[]) { char you='你',me='我',he='他'; System.out.println("汉字'你'在unicode表中的位置:"+(int)you); System.out.println("汉字'我'在unicode表中的位置:"+(int)me); System.out.println("汉字'他'在unicode表中的位置:"+(int)he);}}
2.输出希腊字母表。public class G{ public static void main(String args[]) { int startPosition = 0, endPosition = 0; char cSrart = 'α', cEnd = 'ω'; startPosition = (int) cSrart; endPosition = (int) cEnd; System.out.println("希腊字母表:"); System.out.println("小写:"); for (int i = startPosition; i <= endPosition; i++) { char c = '\0'; c = (char) i; System.out.print(" " + c); if ((i - startPosition + 1) % 10 == 0) { System.out.println(""); } } System.out.println(); cSrart = 'Α'; cEnd = 'Ω'; startPosition = (int) cSrart; endPosition = (int) cEnd; System.out.println("大写:"); for (int 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
- 重写java课程学习二:编写程序
- java课程学习二:编写程序
- Java学习课程七:编写程序
- JAVA课程学习二:99乘法表的编写
- JAVA课程学习二:99乘法表的编写
- Java学习:coursera课程笔记(二)
- java课程学习三:编程序题
- 二、Zedboard学习之SDK程序编写
- 二. MFC框架程序分析--Windows编程课程学习笔记
- 学习使用eclipse编写Java程序
- 编写一个表达学生和课程关系的程序-Java描述
- Web Server程序编写学习笔记(二)
- STM32 学习二 程序编写及GPIO调试
- Chapter04 编写基本的MapReduce程序(二) 非JAVA语言编写mapreduce程序
- LDD学习课程之二
- Java学习课程(1)
- Java学习课程(2)
- Java学习课程(4)
- c文件操作之fgets,fputs
- 21st-Oct 时对时错的方向指令string数组
- 计蒜客 Bridge Automation(ACM ICPC 2017 Warmup Contest 9)
- 【MySQL】常用命令
- Effective-Python
- 重写java课程学习二:编写程序
- main函数执行之前都干啥了----C/C++运行时库剖析
- lingo标准模型与编程(附习题)
- 第五天 Javascript面向对象和一些常用对象
- python 参考手册
- struts-config.xml配置文件详解
- 安卓的LinearLayout实现按钮的点击效果
- leetcode 130 Submission Details
- Codeforces Round #292 D.Drazil and Morning Exercise