• <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 閱讀(788) 評論(0)  編輯 收藏 引用 所屬分類: JAVA
            亚洲午夜久久久精品影院 | 久久伊人精品青青草原高清| 亚洲精品高清国产一线久久| 亚洲中文久久精品无码| 色综合色天天久久婷婷基地| 久久99精品久久久久久不卡| 亚洲精品乱码久久久久66| 国内精品人妻无码久久久影院| 国产精品久久久久aaaa| 久久频这里精品99香蕉久| AV色综合久久天堂AV色综合在| 久久免费大片| 久久精品黄AA片一区二区三区| 久久久久亚洲精品无码网址| 人妻无码久久一区二区三区免费| 精品久久久久久国产免费了| 一本色道久久综合亚洲精品| 国产精品免费久久久久久久久 | 久久久无码精品亚洲日韩按摩 | 色天使久久综合网天天| 99久久国产亚洲高清观看2024| 日韩精品久久久肉伦网站 | 日本久久久精品中文字幕| 亚洲精品99久久久久中文字幕| 久久r热这里有精品视频| 国内精品人妻无码久久久影院导航| 韩国三级中文字幕hd久久精品 | 欧美大战日韩91综合一区婷婷久久青草 | 久久久久亚洲av成人无码电影| 久久久久久无码Av成人影院| 亚洲精品国产第一综合99久久| 久久国产视屏| 久久精品女人天堂AV麻| 亚洲国产精品婷婷久久| 亚洲成色999久久网站| 狠狠色噜噜狠狠狠狠狠色综合久久| 久久夜色精品国产噜噜麻豆| 性欧美大战久久久久久久久| 伊人久久久AV老熟妇色| 久久精品aⅴ无码中文字字幕不卡| 久久久无码人妻精品无码|