I have a bean where I have a field "CustAmount "which is double, I tried testing the bean and i dont seem to understand this: When i run on my local machine it gets initialized to 0.0 when instantiated. When i run the same code in my linux test environment it remains null. due to which there is a difference in the retrieved data meaning if i send the CustAmount as null to my Backend i get some data but if i send the CustAmount as 0.0 the query is done on the basis of 0.0 and sends me nothing back.
How is this possible if the code is same, By any chance is it possible that when i do new MyBean() compiled in java 1.5 the double remains null and in 1.6 it gets initialized to 0.0.
I dont know if this is something that happens in two Java versions but thats the only difference on my end.
Thanks for any hint.
Adding code snippet :
public class MyBean {
private double custAmount;
public void setCustAmount(double custAmount) {
this.custAmount = custAmount;
}
public double getCustAmount() {
return custAmount;
}
}
And I just do
MyBean mybean = new MyBean();
its not a Double but a double. Syed..