//陳冠辰2022.11.7.陣列=順序的同型資料

public class Main { 

  public static void main(String[] args) { 

    String[] hey = {"富豪","法拉利","藍寶堅尼","保時捷","賓士"}; 

    /*宣告字串陣列,[]代表陣列,名稱hi"/

    /*方法length陣列的長度*/

    System.out.println("陣列長度"= + hi.length);

    for (int i = 0;i<hi.length;i++)

    System.out.println(hi[i]);

  } 

}



留言

這個網誌中的熱門文章

陳冠辰Word合併列印

陳冠辰python:集合set串列或清單list字典dictionary元組tuple 3月 27, 2023