41. What will be the output of the following Java code?
import java.util.*;
class Bitset
{
public static void main(String args[])
{
BitSet obj1 = new BitSet(5);
BitSet obj2 = new BitSet(10);
for (int i = 0; i < 5; ++i)
obj1.set(i);
for (int i = 3; i < 13; ++i)
obj2.set(i);
obj1.and(obj2);
System.out.print(obj1);
}
}
import java.util.*;
class Bitset
{
public static void main(String args[])
{
BitSet obj1 = new BitSet(5);
BitSet obj2 = new BitSet(10);
for (int i = 0; i < 5; ++i)
obj1.set(i);
for (int i = 3; i < 13; ++i)
obj2.set(i);
obj1.and(obj2);
System.out.print(obj1);
}
}
42. What are the use of front and rear pointers in CircularQueue implementation?
43. Which of the below is not a subinterface of Queue?
44. Which of these method is used to reduce the capacity of an ArrayList object?
45. How to sort elements of ArrayList?
46. Which of these packages contain all the collection classes?
47. Which of these methods can be used to obtain set of all keys in a map?
48. Which of these methods are member of Remote class?
49. Which of these method Map class is used to obtain an element in the map having specified key?
50. What is the name of a data member of class Vector which is used to store a number of elements in the vector?
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.