Computer Science, asked by roshanimhatre2001, 1 year ago

what is the use of new operator in defining an array in java

Answers

Answered by lalitkumar28
1
Java array can be also be used as astatic field, a local variable or a method parameter. The size of an array must be specified by an int value and not long or short. The direct superclass of an array type is Object.
Answered by cyrusbishop
4

Answer:

 The new keyword is used to allocate the space in dynamic memory for the storage of data and functions belonging to an object while defining an array in Java.

Explanation:

Due to this operator, the class is a set of similar objects. Each object of a class possesses same attributes and common behaviour defined within the same class.

Similar questions