유형 변환 노트

1064 단어
public class Demo05 {
    public static void main(String[] args) {
        int b = 128;
        byte i = (byte)b;//               

        double i1 = b;//          
        System.out.println(i1);
        System.out.println(i);
        System.out.println(b);

        /*       boolean
                        

                 ,    
                     ,      
        */
        System.out.println("============================");
        char c = 'a';
        int d = c+1;
        System.out.println(d);
        int n = 65;int number100yi = 10_0000_0000;
        while(n<123){
            System.out.println((char)n);
            n++;

        }

        //      
        int bigNum = 10_0000_0000;
        int littleNum = 20;
        int numX = bigNum*littleNum;
        long numX1 = bigNum*littleNum; // -1474836480,      ,           
        System.out.println(numX);
        System.out.println(numX1);

        long total3 = bigNum*((long)littleNum);//          long
        System.out.println(total3);
    }
}

좋은 웹페이지 즐겨찾기