Home / CSE MCQs / JAVA MCQs :: Arrays - Java

CSE MCQs :: JAVA MCQs

  1. Which of these operators is used to allocate memory to array variable in Java?
  2. A.
    malloc
    B.
    alloc
    C.
    new
    D.
    new malloc

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which of these is an incorrect array declaration?
  4. 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

    Discuss Discuss in Forum


  5. Which of these is an incorrect Statement?
  6. A.
    It is necessary to use new operator to initialize an array.
    B.
    Array can be initialized using comma separated expressions surrounded by curly braces.
    C.
    Array can be initialized when they are declared.
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Which of these is necessary to specify at time of array initialization?
  8. A.
    Row
    B.
    Column
    C.
    Both Row and Column
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum