Java Collection Part 2

Which of the following is/are true about ArrayList and Vector

What is the output of the following program ?

import java.util.HashMap;
import java.util.Map;
public class MapTest {
    public static void main(String aga[]){
        Map m= new HashMap();
        m.put(null, "Test");
        m.put(null,"Fest");
        System.out.println(m);
    }
}

 

What is/are true about HashMap vs Hashtable

Which of the following is associated with Enumeration ? 

What is the output of the following program ?

import java.util.HashSet;
 
class Animal {
    public int i=12;
    
    public Animal(){
        i=13;
    }
    public String toString(){
        return "Animal"+i;
    }
}
public class Test {
    public static void main(String [] args) throws Exception {
       HashSet s= new HashSet();
       s.add(new Animal());
       s.add(new Animal());
       for(Animal a : s){
           System.out.println(a);
       }
    }
}