public class TypeDemo {
public static void main(String[] args) {
// 目标理解自动类型转换
byte a = 20;
int b = a; //发生了自动类型转换
System.out.println(a);
System.out.println(b);
int age = 23;
double db = age; //自动类型转换
System.out.println(db);
char ch = 'a';
int code = ch;
System.out.println(code);
}
}
public class TypeDemo1 {
public static void main(String[] args) {
//掌握表达式的自动类