Home / CSE MCQs / JAVA MCQs :: Discussion

Discussion :: JAVA MCQs

  1. Which of these method is used to make all elements of an equal to specified value?
  2. A.
    add()
    B.
    fill()
    C.
    all()
    D.
    set()

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    fill() method assigns a value to all the elements in an array, in other words it fills the array with specified value.


Be The First To Comment