To declare your array either use this syntax:
<elementType>[] <arrayName>;
or use this one:
<elementType> <arrayName>[];
Example:
int intArray[];
//intArray will store some integer value
int []intArray;
To Initialize your array, use this for primitive types:
int[] myIntArray = new int[4];
int[] myIntArray = {2, 3, 4};
int[] myIntArray = new int[]{2, 3, 4};
for strings replace int by a string in the above code:
String[] myStringArray = new String[4];
String[] myStringArray = {"q", "w", "e"};
String[] myStringArray = new String[]{"q", "w", "e"};
In case you want to declare the array first and then initialize it:
String[] myStringArray;
myStringArray = new String[]{"q", "w", "e"};