liqi3344520 发表于 2013-2-5 02:16:23

字符转换

public class Int {

public static void main(String[] args) {
byte a=3;
long b=69863935;
short c=24;
int d1=(int)a;
int d2=(int)b;
int d3=(int)c;
System.out.println(d1);
System.out.println(d2);
System.out.println(d3);
}

}

把整数型byte long short 转换成int。
页: [1]
查看完整版本: 字符转换