HashMap probaVector=null; 只是为变量命名,并没有为他分配空间,直接用会导致错误 正确的方法要用new关键字为它分配空间 HashMap probaVector=new(HashMap);