例2-1和例2-2
public class Example2_1{
public static void main (String args[]){
char c='α';
System.out.println("字母"+c+"在unicode表中的顺序位置:"+(int)c);
System.out.println("字母表:");
for(int i=(int)c;i<c+25;i++){
System.out.print(""+(char)i);
}
}
}
public class Example2_2{
public static void main (String args[]){
byte a=120;
short b=130;
int c=2200;
long d=8000;
float f;
double g=0.1234567812345678;
a=(byte)b;
c=(int)d;
f=(float)g;
System.out.println("a="+a);
System.out.println("c="+c);
System.out.println("f="+f);
System.out.println("g="+g);
}
}