?? testchar.java
字號:
/**
* Description:
* <br/>Copyright (C), 2005-2008, Yeeku.H.Lee
* <br/>This program is protected by copyright laws.
* <br/>Program Name:
* <br/>Date:
* @author Yeeku.H.Lee kongyeeku@163.com
* @version 1.0
*/
public class TestChar
{
public static void main(String[] args)
{
//直接指定單個字符作為字符常量
char aChar = 'a';
//使用轉(zhuǎn)義字符來作為字符常量
char enterChar = '\r';
//使用Unicode編碼值來指定字符常量
char ch = '\u9999';
//將輸出一個'香'字符
System.out.println(ch);
//定義一個'中'字符常量
char zhong = '中';
//直接將一個char變量當(dāng)成int類型變量使用
int zhongValue = zhong;
System.out.println(zhongValue);
//直接把一個0~65535范圍內(nèi)的int整數(shù)賦給一個char變量
char c = 97;
System.out.println(c);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -