• <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 閱讀(785) 評論(0)  編輯 收藏 引用 所屬分類: JAVA
            欧美与黑人午夜性猛交久久久| 国内精品久久久久影院薰衣草| 丁香五月网久久综合| 99久久人人爽亚洲精品美女| 亚洲&#228;v永久无码精品天堂久久 | 伊人久久大香线蕉综合网站| 久久福利资源国产精品999| 成人久久免费网站| 国产精品久久久久一区二区三区 | 亚洲αv久久久噜噜噜噜噜| a级成人毛片久久| 久久久久亚洲AV片无码下载蜜桃| 久久国产乱子精品免费女| 久久精品青青草原伊人| 大蕉久久伊人中文字幕| 久久发布国产伦子伦精品| 2021国产精品午夜久久| 精品视频久久久久| 久久国产乱子伦免费精品| 久久精品一本到99热免费| 久久夜色精品国产www| 久久精品国产亚洲沈樵| 亚洲精品无码久久久久sm| 欧美激情精品久久久久久久| 久久综合综合久久狠狠狠97色88| 伊人久久综合无码成人网| 亚洲精品乱码久久久久久蜜桃| 国产精品99久久不卡| 亚洲午夜久久影院| 日本久久久精品中文字幕| 国产精品久久一区二区三区 | 国产精品久久久久aaaa| 久久精品午夜一区二区福利| 狠狠色婷婷久久一区二区| 九九精品久久久久久噜噜| 亚洲午夜久久久| 99精品久久久久久久婷婷| 无码人妻久久一区二区三区免费丨 | 国产成人香蕉久久久久| 国产ww久久久久久久久久| 久久93精品国产91久久综合|