出现了什么异常
所有对象都可以装入hashtable的

解决方案 »

  1.   

    请贴出你的Exception 具体信息!!!!
      

  2.   

    import java.util.*;public class start {
      public Hashtable table;
      public Agent agent;  public static void main(String[] args) {
        start st=new start();
        st.agent=new Agent();
        st.table.put("hello",st.agent);
      }
    }package referance;
    import java.io.*;
    import java.lang.Thread;
    import java.security.*;public class Agent extends Thread{
      public Agent()
      {
        System.out.println("Hello world,I am constructor.");
      }
      public void run()
      {
        System.out.println("Father  begin to run. ");
      }
    }java.lang.NullPointerException at referance.start.main(start.java:11)Exception in thread "main" Hello world,I am father constructor.
    请指教
      

  3.   

    public Hashtable table = new Hashtable();