劉任昌,陣列array使用迴圈輸出

w3schools程式碼

//劉任昌2022.11.7.陣列=順序的同型資料
public class Main {
  public static void main(String[] args) {
    String[] hey = {"富豪", "寶馬", "福特", "馬自達", "撈屎來食"};
    /*宣告字串陣列,[]代表陣列,名稱hey */
    /* 方法 length 陣列的長度, 使用迴圈列出所有我的汽車 */
    System.out.println( "陣列長度=" + hey.length);
    for ( int i = 0; i < hey.length; i++)
    System.out.println( hey[i]);
  }
}

w3schools程式碼截圖

重點整理,期末考

  • 資料型態分成二大類:原形primitive與非原始形non-primitive又稱為參照reference型態
  • 原形primitive八類:
    1. 布林
    2. 位元數
    3. 短整數
    4. 整數
    5. 長整數
    6. 字元
    7. 浮點數
    8. 倍精數

留言

  1. https://ling-cls.blogspot.com/2022/11/2022.html

    回覆刪除
  2. 方思涵
    https://pandora-mo.blogspot.com/2022/11/w3schoolsjava.html

    回覆刪除
  3. https://html-css-javascript-java.blogspot.com/2022/11/array.html

    回覆刪除
  4. https://tonyzhuang1.blogspot.com/2022/11/array.html

    回覆刪除
  5. https://eric-young92.blogspot.com/2022/11/array.html

    回覆刪除
  6. https://www.blogger.com/blog/post/edit/7245421414969147391/7403531409679540863

    回覆刪除
  7. https://erichtml-css-javascript-java.blogspot.com/2022/11/array.html

    回覆刪除
  8. https://steven0918.blogspot.com/2022/11/2022.html

    回覆刪除
  9. https://hsuppppp.blogspot.com/2022/11/htmlcssjavascriptjava.html

    回覆刪除
  10. https://meishiuanlin.blogspot.com/2022/11/array.html

    回覆刪除
  11. https://danny1219.blogspot.com/2022/11/array.html

    回覆刪除
  12. https://winnie032879.blogspot.com/2022/11/array.html

    回覆刪除
  13. https://chen-yu-hsi.blogspot.com/2022/11/array.html

    回覆刪除
  14. https://bill81408.blogspot.com/2022/11/2022117.html

    回覆刪除
  15. https://liaoyongruei.blogspot.com/2022/11/array.html

    回覆刪除
  16. https://sallyjhang.blogspot.com/2022/11/array.html

    回覆刪除
  17. https://chenyuhung123.blogspot.com/2022/11/array.html

    回覆刪除
  18. https://guixiu1485.blogspot.com/2022/11/array.html

    回覆刪除
  19. https://d11117328.blogspot.com/2022/11/2022.html

    回覆刪除
  20. https://1dth36.blogspot.com/2022/11/2022.html

    回覆刪除
  21. https://www.blogger.com/blog/post/edit/8098460896125661899/5567866306837510687

    回覆刪除
  22. https://zhangzheming920304.blogspot.com/2022/11/blog-post.html

    回覆刪除
  23. https://kuanhtml-css-javascript-java.blogspot.com/2022/11/blog-post.html

    回覆刪除
  24. 作者已經移除這則留言。

    回覆刪除
  25. https://www.blogger.com/u/1/blog/post/edit/5683775077331287445/7026375393697318077

    回覆刪除
  26. https://www.blogger.com/u/1/blog/post/edit/preview/4659431907800654215/989377455316978686

    回覆刪除
  27. https://www.blogger.com/blog/post/edit/preview/806569381277431188/1778575046643412603

    回覆刪除
  28. https://d11117312.blogspot.com/2023/01/array.html

    回覆刪除
  29. https://d11117315.blogspot.com/2023/01/11-06-2022-h1padding-10px-background.html

    回覆刪除
  30. https://html-css-javascript-javatang.blogspot.com/2023/01/blog-post.html

    回覆刪除

張貼留言

這個網誌中的熱門文章

劉任昌Bro Code貪吃蛇python snake game

劉任昌tkinter視窗函式庫Entry工具widget

劉任昌HTML金一乙