See More

package arrayPractice; public class ArrayClass { public static void main(String[] args) { String [] color = new String [4]; //0 1 2 3 color[0]= "Red"; color [1]= "Pink"; color [2]="Black"; color [3]="Blue"; System.out.println(color[3]); String [] colorOne= {"Red","Pink", "Black", "Blue"}; System.out.println(colorOne[3]); System.out.println(color); // we can not print all the values of an array just like primitive variables //for (int j = 0; j<=5; j++) { //System.out.println(j); //} for (int i=0; i