Quick actions

cmd+k|ctrl+k

Navigation

Languages

Array

Snippet info

Language

Java

Visibility

public

Author

fxp007

Created

2016-04-29T15:48:53Z

Updated

2016-04-29T15:48:53Z

class Main {
    public static void main(String[] args) {
        test1();
        test2();
    }
    
    public static void test1(){
        String[] students = new String[] {"Tiger","Ray","Amy","Macro"};
        System.out.println("A");
        System.out.println(students.length);
    }
    
    public static void test2(){
        String[] students = new String[4];
        students[0]= "Tiger";
        students[1]= "Ray";
        students[2]= "Amy";
        students[3]= "Macro";
        System.out.println("B");
        System.out.println(students.length);
    }
}
INFO