An array declaration uses square brackets to indicate the dimension of the array. Note that these brackets can appear with the type, with the variable name, or as a mixture. Array creation uses the new keyword. Newly created numeric primitive arrays are filled with zeros; boolean arrays are filled with false; reference arrays are filled with null. Examples:
int[] x = new int[32] ; // zeros boolean flg[] = new boolean[ 100 ] ; // false Float[] y[] = new Float[10][10] ; // null
If a package statement is present, it must be the first noncomment statement in the file.
You don't have to import the java.lang package. However, every other package you use must be named in an import statement, ...
No credit card required