1. 程式人生 > >Java 陣列定義的常見方式

Java 陣列定義的常見方式



public static void main(String[] args) {  

    String[] arr1= new String[2];  

    String[] arr2= {"陣列0","陣列1","陣列2","...."};  

    String[] arr3= new String[]{"陣列0","陣列1","陣列2","...."};  
    
}