运行教程中的SimpleOberserBug时,会报
" d/ J0 s, N$ P5 A. z B, M6 AException in thread "main" java.lang.NullPointerException5 U6 I5 u5 x# W
at com.tutorial.SimpleObserverBug.StartSimpleBug.main(StartSimpleBug.java:36): O2 O( D9 P0 X6 o* x9 h1 u) r
) S$ O3 c* A# V! k5 }' }
就是运行 displaySwarm.buildObjects();方法时报错,到底是什么原因呢?8 R5 N: l* v" @) K N
, F. q% @# a7 @" b5 l
难道是和我的JDK有关吗?我用的版本是1.5的。, y% I/ S8 [( c" L# h `, |) G
& e' w& d9 c" b( o6 q谢谢,有哪位朋友指点一下,感激不尽。 |