Home / CSE MCQs / JAVA MCQs :: Discussion

Discussion :: JAVA MCQs

  1. Which of these is an incorrect array declaration?
  2. A.
    int arr[] = new int[5]
    B.
    int [] arr = new int[5]
    C.
    int arr[]
    arr = new int[5]
    D.
    int arr[] = int [5] new

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    Operator new must be succeeded by array type and array size.


Be The First To Comment