Java Programming/Keywords/new
From Wikibooks, the open-content textbooks collection
new is a Java keyword. It creates a Java object and allocates memory for it on the heap. new is also used for array creation, as arrays are also objects.
Syntax:
JavaType variable =newJavaObject();[] intArray =intnewint[10]; String[][] stringMatrix =newString[5][10];
See also: