I'm doing a training program with a company, and one of the projects involves creating a Hashtable with numbers from 1-10 in it. I have to transfer those numbers into another Hashtable. I've been working with it for the last hour and can't figure it out. Here's what I have so far...
Can anybody show me a way I can transfer the contents from tableSrc to tableDest?
import java.util.Hashtable;
public class Q3 {
public static void main(String[] args)
{
Hashtable<String, Integer> tableSrc = new Hashtable<String, Integer>();
Hashtable<String, Integer> tableDest = new Hashtable<String, Integer>();
tableSrc.put("One", 1);
tableSrc.put("Two", 2);
tableSrc.put("Three", 3);
tableSrc.put("Four", 4);
tableSrc.put("Five", 5);
tableSrc.put("Six", 6);
tableSrc.put("Seven", 7);
tableSrc.put("Eight", 8);
tableSrc.put("Nine", 9);
tableSrc.put("Ten", 10);
}
}
Can anybody show me a way I can transfer the contents from tableSrc to tableDest?

