• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆-145  評論-173  文章-70  trackbacks-0
             1public class ArrayDemo{
             2    public static void main(String[] args){
             3        int[] anArray; anArray = new int[10];
             4        for (int i = 0; i < anArray.length; i++){
             5            anArray[i] = i;
             6            System.out.println(anArray[i] + " ");
             7        }

             8        System.out.println();
             9    }

            10}

            11

             1public class ArrayOfIntergersDemo{
             2    public static void main(String[] args){
             3        Integer[] anArray = new Integer[5];
             4        for (int i = 0; i < anArray.length; i++){
             5            anArray[i] = new Integer(i);
             6            System.out.println(anArray[i]);
             7        }

             8    }

             9}

            10

             1public class ArrayOfStringDemo{
             2    public static void main(String[] args){
             3        String[] anArray = "String One",
             4            "String Two",
             5            "String Threee"
             6        }
            ;
             7        for (int i = 0; i < anArray.length; i++){
             8            System.out.println(anArray[i].toLowerCase());
             9        }

            10    }

            11}

            12

             1import java.lang.Math;
             2
             3public class exp{
             4    public static void main(String[] args){
             5        double x = 11.635;
             6        double y = 2.76;
             7        System.out.println("the value of e is " + Math.E);
             8        System.out.println("exp(" + x + ") is " + Math.exp(x));
             9        System.out.println("log(" +x+ ") is " + Math.log(x));
            10
            11        System.out.println("pow(" +x+ "," +y+ ") is" + Math.pow(x,y));
            12        System.out.println("sqrt(" +x+ ") is " + Math.sqrt(x));
            13    }

            14}

            15

             1public class Trig{
             2    public static void main(String[] args){
             3        double degree = 45.0;
             4        double redians = Math.toDegrees(degree);
             5        System.out.println("the value of pi is" + Math.PI);
             6        System.out.println("the sin of" + degree + " is "
             7                +Math.sin(degree));
             8        System.out.println("the cos of " + degree + " is "
             9                +Math.cos(degree));
            10        System.out.println("the tan of " + degree + " is "
            11                +Math.tan(degree));
            12        System.out.println("the arc tan of " + redians + " is "
            13                +Math.atan(redians));
            14        System.out.println("the arc sin of "+ redians + " is "
            15                +Math.asin(redians));
            16    }

            17}

            18


            發點思考:
            1,按照書上面一個個敲代碼是很有好處的。手寫代碼也是不錯的。原始的方法或許更加有效果!
            2.java的幾點,從這個上面看來。1,java中,一個數組,可以是對象數組,就是說它的內容是一個對象,這樣的,它的創建不僅要new,其中的內容也要new,否則沒有創建對象哪里來的那些內容呢?
            就像是內置類型一樣,那些new處理的當然也是數組,所以是Integer[5]來表示數組。
            而要是賦值或者初始化的話,就是用的括號,表示調用構造函數,因為類和構造函數是同名的。這次就完成了上面的內容。。
            posted on 2009-12-20 21:16 deercoder 閱讀(793) 評論(0)  編輯 收藏 引用 所屬分類: JAVA
            91精品国产色综久久| 久久精品国产精品亚洲艾草网美妙| 久久精品一本到99热免费| 色欲av伊人久久大香线蕉影院| 亚洲精品乱码久久久久久自慰| 久久久久四虎国产精品| 狠狠色丁香久久婷婷综合_中 | 国产精品伦理久久久久久| 久久综合一区二区无码| 精品久久8x国产免费观看| 久久天天日天天操综合伊人av| 亚洲国产精品成人久久| 怡红院日本一道日本久久| 久久综合亚洲色一区二区三区| 国产精品久久久久aaaa| 久久精品免费一区二区| 婷婷久久综合| 韩国三级中文字幕hd久久精品| 国产成人无码精品久久久性色| 久久久久国色AV免费看图片| 久久久精品一区二区三区| 色狠狠久久AV五月综合| 无码人妻久久一区二区三区蜜桃| 国产精品熟女福利久久AV| 久久99毛片免费观看不卡| 国产亚洲美女精品久久久2020| 欧美国产精品久久高清| 久久久久久亚洲精品无码| 久久99国产精品久久99果冻传媒| 精品久久8x国产免费观看| 精品熟女少妇a∨免费久久| 久久狠狠爱亚洲综合影院| 久久综合亚洲鲁鲁五月天| 老男人久久青草av高清| 伊人久久无码中文字幕| 久久夜色精品国产噜噜麻豆| 99蜜桃臀久久久欧美精品网站| 久久精品成人欧美大片| 蜜臀久久99精品久久久久久小说 | 国内精品久久久久影院优 | 久久超乳爆乳中文字幕|