基本类型转换

 

 

 

 

long -> int           |         long x = 10;     int y = (int) x;

Long -> Integer       |         Long x = (long) 10; Integer y = x.intValue();

int -> long           |         int x = 10 ; long y = (long) x;

Integer -> Long       |         Integer x = 10; Long y = x.longValue();

 

posted @ 2018-12-11 11:07  岁月尔尔  阅读(89)  评论(0编辑  收藏  举报