Which of the following is a bad array declaration?
A.int arr[] = new int[5]
B. [] int new int[5] = arr
C. int arr[]arr = new int[5] C. int arr[]arr = new int[5]
D. int arr[] = new int [5]
Answer:D
Which of the following is a bad array declaration?
A.int arr[] = new int[5] B. [] int new int[5] = arr C. int arr[]arr = new int[5] C. int arr[]arr = new int[5] D. int arr[] = new int [5]
Explanation: Operator new must be succeeded by array type and array size.