package com.shrimpking.t5;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Shrimpking
 * @create 2024/10/23 10:31
 */
public class TypeCast2_1
{
    public static void main(String[] args)
    {
        byte b = 1;
        int i = b; //隐式转换
        long l = b; //隐式转换
        float f = b; //隐式转换
        double d = b; //隐式转换
        System.out.println("byte:" + b);
        System.out.println("int:" + i);
        System.out.println("long:" + l);
        System.out.println("float:" + f);
        System.out.println("double:" + d);
        char ch = 'c';
        int i2 = ch;
        System.out.println("i2:" + i2);
        short s = 99;
        char ch2 = (char)s;
        System.out.println("char:" + ch2);
        byte b1 = (byte)129;
        System.out.println("b1:" + b1);
    }
}