package 数据类型;
//字符相加char
class CharDemo2 {
public static void main(String args[]){
char ch1;
ch1 = 'X';
System.out.println("ch1 contains " + ch1);
ch1++;
System.out.println("ch1 is now " + ch1);
}
}
/*
* ch1首先被赋值X。然后变量ch1递增(自增量1)
* 结果ch1带表Y
* 即在ASCII(以及Unicode)字符集中的下一个字符
*/