day03 可以互相转换的基本数据类型的自动转换和强制转换

class VarDemo2
{
public static void main(String[] args) 
{


// int x = 3;
// byte b = 5;
// x  = x + b;


// byte b = 3;
// b = (byte)(b + 200);//强制类型转换。





//System.out.println((char)('a'+1));
// System.out.println('你'+0);//unicode国际标准码表。




byte b = 4;
//b = 3+7;
byte b1 = 3;
byte b2 = 7;


//b2 = 127;
int x;
//b = b1 + b2;
int x1 =Integer.MAX_VALUE ;
int x2 =2;
x = x1+x2;


//System.out.println(x);






int n = 8;
n = 9;
n = 19;


//System.out.println(n);





}
}

你可能感兴趣的:(java基础代码)