1// array of 5 strings
2String[] arr = new String[5]
3
4arr[0] = "Happy";
5arr[1] = "Birthday";
6arr[2] = "To";
7// etc...
1//method 1
2int[] age = new int[3];
3 age[0] = 1;
4 age[1] = 3;
5 age[2] = 6;
6
7 for (int i=0; i < 3; i++)
8 System.out.println(age[i]);
9
10//method 2
11 int[] num = {3,3,5};
12 //int num[] = {3,3,5}; also works the same
13
14 System.out.println(num[0]);