Java中数据类型及其之间的转换
数据类型:
数值型 :整数类型(byte,short,int,long)、浮点类型(float,double)
——基本数据类型 —— 字符型(char)
| 布尔型(boolean)
数据类型 《
| 类(class)
——引用数据类型 —— 接口(interface)
数组
基本数据类型转换:
[ float ] [ double ]
^ ^
[ byte ] ——》 [ short ] ——》 [ int ] ——》 [ long ]
^
[ char ]
数据类型:
数值型 :整数类型(byte,short,int,long)、浮点类型(float,double)
——基本数据类型 —— 字符型(char)
| 布尔型(boolean)
数据类型 《
| 类(class)
——引用数据类型 —— 接口(interface)
数组
基本数据类型转换:
[ float ] [ double ]
^ ^
[ byte ] ——》 [ short ] ——》 [ int ] ——》 [ long ]
^
[ char ]
全面讲解:http://www.360doc.com/content/16/1115/18/35713192_606806436.shtml