61. Which of the below does not implement Map interface?
62. Which of these classes provide implementation of map interface?
63. Which of these methods is used to retrieve elements in BitSet object at specific location?
64. Which of these exceptions is thrown by remover() method?
65. Which of these method of HashSet class is used to add elements to its object?
66. What will be the output of the following Java program?
import java.util.*;
class Array
{
public static void main(String args[])
{
int array[] = new int [5];
for (int i = 5; i > 0; i--)
array[5 - i] = i;
Arrays.sort(array);
System.out.print(Arrays.binarySearch(array, 4));
}
}
import java.util.*;
class Array
{
public static void main(String args[])
{
int array[] = new int [5];
for (int i = 5; i > 0; i--)
array[5 - i] = i;
Arrays.sort(array);
System.out.print(Arrays.binarySearch(array, 4));
}
}
67. What will be the output of the following Java program?
class Output
{
public static void main(String args[])
{
ArrayList obj = new ArrayList();
obj.add("A");
obj.add("D");
obj.ensureCapacity(3);
obj.trimToSize();
System.out.println(obj.size());
}
}
class Output
{
public static void main(String args[])
{
ArrayList obj = new ArrayList();
obj.add("A");
obj.add("D");
obj.ensureCapacity(3);
obj.trimToSize();
System.out.println(obj.size());
}
}
68. Which of this interface must contain a unique element?
69. What is the difference between length() and size() of ArrayList?
70. If the size of the array used to implement a circular queue is MAX_SIZE. How rear moves to traverse inorder to insert an element in the queue?
Read More Section(Collections Framework in java)
Each Section contains maximum 100 MCQs question on Collections Framework in java. To get more questions visit other sections.