java隐式类型转换

package xiaofu;

public class Conver {

public static void main(String[] args) {

// TODO Auto-generated method stub

byte mybyte =127;

int myint =150;

float myfloat=452.12f;

char mychar=10;

double mydouble=45.46546;

System.out.println("byte型与float数据进行运算结果为:"+(mybyte+myfloat));

System.out.println("byte型与int数据进行运算结果为:"+(mybyte*myint));

System.out.println("byte型与char数据进行运算结果为:"+(mybyte/mychar));

System.out.println("byte型与char数据进行运算结果为:"+(mybyte+mychar));

}

}

java隐式类型转换_第1张图片

 

你可能感兴趣的:(java,jvm,eclipse)