Sail E0 Webinar

MCQs

Total Questions : 105 | Page 7 of 11 pages
Question 61.

Which of these class contains only floating point functions?


  1.    Math
  2.    Process
  3.    System
  4.    Object
 Discuss Question
Answer: Option A. -> Math

Math class contains all the floating point functions that are used for geometry, trignometry, 

Question 62.

Which of the following statements are incorrect?


  1.    Variables declared as final occupy memory.
  2.    final variable must be initialized at the time of declaration.
  3.    Arrays in java are implemented as an object.
  4.    All arrays contain an attribute-length which contains the number of elements stored in the array.
 Discuss Question
Answer: Option A. -> Variables declared as final occupy memory.

None.


Question 63.

Which of these methods can be used to obtain a static array from an ArrayList object?


  1.    Array()
  2.    covertArray()
  3.    toArray()
  4.    covertoArray()
 Discuss Question
Answer: Option A. -> Array()

None.


Question 64.

Which of these methods can be used to delete the last element in a LinkedList object?


  1.    remove()
  2.    delete()
  3.    removeLast()
  4.    deleteLast()
 Discuss Question
Answer: Option C. -> removeLast()

removeLast() and removeFirst() methods are used to remove elements in end and 

beginning of a linked list.



Question 65.

Which of these methods can be used to obtain set of all keys in a map?


  1.    getAll()
  2.    getKeys()
  3.    keyall()
  4.    keySet()
 Discuss Question
Answer: Option D. -> keySet()

keySet() methods is used to get a set containing all the keys used in a map. This 

method provides set view of the keys in the invoking map.


Question 66.

Which of these methods can be used to search an element in a list?


  1.    find()
  2.    sort()
  3.    get()
  4.    binaryserach()
 Discuss Question
Answer: Option D. -> binaryserach()

binaryserach() method uses binary search to find a specified value. This method must 

be applied to sorted arrays.


Question 67.

Which of these methods is used to add elements in vector at specific location?


  1.    add()
  2.    set()
  3.    AddElement()
  4.    addElement()
 Discuss Question
Answer: Option D. -> addElement()

addElement() is used to add data in the vector, to obtain the data we use elementAt() and 

to first and last element we use firstElement() and lastElement() respectively.


Question 68.

Which of these methods is used to retrieve the elements in properties object at 

specific location?


  1.    get()
  2.    Elementat()
  3.    ElementAt()
  4.    getProperty()
 Discuss Question
Answer: Option D. -> getProperty()

None.


Question 69.

Which of these methods is used to retrieve elements in BitSet object at specific location?


  1.    get()
  2.    Elementat()
  3.    ElementAt()
  4.    getProperty()
 Discuss Question
Answer: Option A. -> get()

None.


Question 70.

Which of these method of ArrayList class is used to obtain present size of an object?


  1.    size()
  2.    length()
  3.    index()
  4.    capacity()
 Discuss Question
Answer: Option A. -> size()

None.

Latest Videos

Latest Test Papers