How do you instantiate an array in Java?
A. int arr[] = new int(3);
B. int arr[];
C. int arr[] = new int[3];
D. int arr() = new int(3);
Answer:C
How do you instantiate an array in Java?
A. int arr[] = new int(3); B. int arr[]; C. int arr[] = new int[3]; D. int arr() = new int(3);
Explanation: It’s worth noting that int arr[]; declares an array, while int arr[] = new int[3]; instantiates one.