if (a!= null ){
b.setClaSubBalance(new Double(b.getClaSubBalance().doubleValue() + a.getClaSubBalance().doubleValue()));
}
where a and b are objects of a class.
In the very first loop the values in b will be null. How can I handle this.
if (a!= null ){
b.setClaSubBalance(new Double(b.getClaSubBalance().doubleValue() + a.getClaSubBalance().doubleValue()));
}
where a and b are objects of a class.
In the very first loop the values in b will be null. How can I handle this.
I really don't understand that thing in brackets but why not just give b an initial value of 0 or something?
Hi,
What a surprise :) a and b are objects of calsses...
Have you tried:
TypeOfB = new TypeOfB(params);
That will initialize variable b, which is not null anymore.