Difference between null==object and object==null

Posted by priyank.mp on Stack Overflow See other posts from Stack Overflow or by priyank.mp
Published on 2010-06-09T08:20:59Z Indexed on 2010/06/09 8:22 UTC
Read the original article Hit count: 403

Hi I would like to know diff between the above comparisons?

I am getting null pointer exception when I check object.getItems() == null. But if I change it to null == object.getItems(), it workes fine.

I did look into this http://stackoverflow.com/questions/2938476/what-is-the-difference-between-null-object-and-objectnull-closed But I didnt get satisfactory answer.

© Stack Overflow or respective owner

Related posts about java

Related posts about object