Java examples for Language Basics:Array
Initializing an Array by assigning them one by one:
public class Main { public static void main(String[] args) { 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"; }/*w ww . j a v a2 s. c o m*/ }