运行教程中的SimpleOberserBug时,会报2 j& H& M6 D7 X/ a1 h
Exception in thread "main" java.lang.NullPointerException, h3 ^4 @; Q5 j1 A
at com.tutorial.SimpleObserverBug.StartSimpleBug.main(StartSimpleBug.java:36)( }' e9 I( V1 T
0 |9 o: s0 s. E% ?$ X2 t
就是运行 displaySwarm.buildObjects();方法时报错,到底是什么原因呢? # l2 _. F0 z+ _- G ; [& R _& @% |难道是和我的JDK有关吗?我用的版本是1.5的。1 \2 s `4 C ]; c+ n