I am initializing an array like this:
public class Array { int data[] = new int[10]; /** Creates a new instance of Array */ public Array() {
Syntax
Datatype[] variable = new Datatype[] { value1,value2.... } Datatype variable[] = new Datatype[] { value1,value2.... }
Example :
int [] points = new int[]{ 1,2,3,4 };