How do you declare an array in java?
Answers
Answered by
2
Answer:
//different ways of declarations
int intArray[];
or int[] intArray;
int[] intArray = new int[]{ 1,2,3,4,5,6,7,8,9,10 };
int intArray[]; //declaring array
intArray = new int[20]; // allocating memory to array
Explanation:
Similar questions