集册 Java实例教程 通过一对一分配数组来初始化它们:

通过一对一分配数组来初始化它们:

欢马劈雪     最近更新时间:2020-01-02 10:19:05

512
通过一个一个地分配数组来初始化它们:

public class Main {


  public static void main(String[] args) {/** 来 自 时代Java - N o w  J a v a . c o m**/

    String[] days = new String[7];

    days[0] = "Sunday";

    days[1] = "Monday";

    days[2] = "Tuesday";

    days[3] = "Wednesday";

    days[4] = "Thursday";

    days[5] = "Friday";

    days[6] = "Saturday";


  }


}