Check out example codes for "declare array java inline". It will help you in understanding the concepts better.

Code Example 1

String[] strs = {"blah", "hey", "yo"};

Code Example 2

new String[]{"blah", "hey", "yo"};

Learn ReactJs, React Native from akashmittal.com