ExamVeda
Login
Home
71
What will be the output of the following Java program?
import java.util.*;
class Collection_iterators 
{
    public static void main(String args[]) 
    {
        LinkedList list = new LinkedList();
        list.add(new Integer(2));
        list.add(new Integer(8));
        list.add(new Integer(5));
        list.add(new Integer(1));
        Iterator i = list.iterator();
        Collections.reverse(list);
  Collections.shuffle(list);
        i.next();
        i.remove();
        while(i.hasNext())
      System.out.print(i.next() + " ");
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
72
PriorityQueue is thread safe.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
73
Which of these method is used to make a bit zero specified by the index?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
74
Which of these is a method of class Date which is used to search whether object contains a date before the specified date?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
75
Which of these is a class which uses String as a key to store the value in object?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
76
When two threads access the same ArrayList object what is the outcome of the program?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
77
What will be the output of the following Java program?
import java.util.*;
class Output 
{
    public static void main(String args[]) 
    {
        ArrayList obj = new ArrayList();
        obj.add("A");
        obj.add(0, "B");
        System.out.println(obj.size());
    }
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
78
Which data structure is used in Breadth First Traversal of a graph?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
79
Which of these classes is not part of Java's collection framework?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board