96.
What will be the output of the following Java program?
import java.util.*;
class Collection_iterators 
{
    public static void main(String args[]) 
    {
        ListIterator a = list.listIterator();
            if(a.previousIndex()! = -1)
                while(a.hasNext())
              System.out.print(a.next() + " ");
            else
               System.out.print("EMPTY");
    }
}

97.
What will be the output of the following Java program?
import java.lang.reflect.*;
class Additional_packages
{	 
     public static void main(String args[])
     {
   try
         {
       Class c = Class.forName("java.awt.Dimension");
 Method methods[] = c.getMethods();
 for (int i = 0; i < methods.length; i++)
     System.out.println(methods[i]);
   }
   catch (Exception e)
         {
         System.out.print("Exception");
         }
    }
}

98.
What happens if we put a key object in a HashMap which exists?

100.
How to externally synchronize hashmap?

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.