Check out example codes for "java initialize array in one line". It will help you in understanding the concepts better.

Code Example 1

int[] array = {1, 2, 3, 4, 5, 6, ,7, 8};

Learn ReactJs, React Native from akashmittal.com