Why is the Java main method static?

The main() is static so that it can be invoked by the runtime engine without creating an instance of the class.

btw, it is just a convention to call this function "main". java.exe will try find the main() function to run. (You can actually write your own version of java.exe to change this name)

Reference:
http://stackoverflow.com/questions/146576/why-is-the-java-main-method-static

Java Array

Definition:
int[] arr1;
int[] arr1 = new int[ 10 ];
int[][] arr1 = new int[ 10 ][ 3 ];
int[] arr1 = { 1, 2, 3, 4, 5 };

Usage:
ans = arr1[ 0 ];
length = arr1.length;

Array sort:
String s = "987654321";
char[] c = s.toCharArray();
java.util.Arrays.sort( c );
System.out.println ( new String( c ) );