Why .equals method is failing on two same value objects?
问题 I have created a value object MarketVO and two instances of this value object have same elements and same value for each element. My value object class is: public class MarketVO { private double floatAmt; private Date marketDate; private long marketCap; } Here are the values: returnedData: FloatAmt: 247657.5418618201, MarketCap: 5249164, MarketDate: 2011-07-29 00:00:00.0 expectedData: FloatAmt: 247657.5418618201, MarketCap: 5249164, MarketDate: 2011-07-29 00:00:00.0 Now in my unit test class,