通过一个一个地分配数组来初始化它们:
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"; } }