变量名第一个字母小写,后面大写. 自动类型转换: 容量小的类型自动转换成容量大的数据类型 byte,short,int->float->long->double byte,short,int不会相互转换,它们三者在计算时会转换成int类型运算,返回值也是int类型 强制类型转换: 容量大的类型转换成容量小的数据类型时,要加上强制转换符 long n = 100L; int i = (int)n; 有可能造成精度降低或者内存溢出,使用时要小心. Boolean类型不能转换成任何其他数据类型…
转自:http://blog.csdn.net/sunboy_2050/article/details/7310008 版权声明:本文为博主原创文章,未经博主允许不得转载. Java基本数据类型int 32bitshort 16bitlong 64bitbyte 8bit char 16bitfloat 32bitdouble 64bit boolean 1bit,This data type represents one bit of information…