hi, i got a problem which i'm unable to solve. my program generate the desire output i wants but it also generate an error which i dont understand too. appriecate any help on this. thanks . this are part of the esstential program codes
error generate : java.lang.NullPointerException at Tester.main(Tester.java:16)
[ October 20, 2007: Message edited by: xiao sean ]
Ulf already stated the problem. There are many possible solutions for your problem. One is to make the Array sized as you need it. Another ist to comment in (and correct the line testClock=new Clock(108,"IMC","8"); . You could also do a check if the array at position [i] is not null and only if that is the case execute the "getPrice()-getModel()"-line.
a fool thinks himself to be wise, but a wise man knows himself to be a fool - shakespeare. foolish tiny ad: