public class PromosiBiner {
    public static void main(String[] args) {
        byte a = 10, b = 20;
        int hasilByte = a + b;           // byte + byte -> int
        System.out.println("byte + byte  = int  : " + hasilByte);

        short s = 300;
        int hasilShort = s + s;          // short + short -> int
        System.out.println("short + short = int : " + hasilShort);

        char huruf = 'A';
        int kodeBerikut = huruf + 1;     // char + int -> int
        System.out.println("'A' + 1      = int  : " + kodeBerikut);

        long populasi = 8_600_000L;
        long tambah = populasi + 1000;   // long + int -> long
        System.out.println("long + int   = long : " + tambah);

        double rasio = 7.0 / 2;          // double / int -> double
        System.out.println("7.0 / 2      = " + rasio);
        System.out.println("7 / 2        = " + (7 / 2));   // int / int -> int
    }
}
