1int[] data = {10,20,30,40,50,60,71,80,90,91};
2// or
3int[] data;
4data = new int[] {10,20,30,40,50,60,71,80,90,91};
5// or
6int[] data = new int[10];
7data = {10,20,30,40,50,60,71,80,90,91};
1int[] arr = new int[5]; // integer array of size 5 you can also change data type
2
1int[] data = {10,20,30,40,50,60,71,80,90,91};
2
3// or
4
5int[] data;
6data = new int[] {10,20,30,40,50,60,71,80,90,91};
7
1int[] numbers = new int[5]; /* size of the array is 5 */
2int[] nums = new int[] {1, 2, 3, 4, 5}; /* Fill the array ny these numbers*/
3String[] names = new String[10]; /* array of type string and size 10 */
4String[] countries = new String[] {"Germany", "US"};