Comparing two objects, either of which could be null

后端 未结 4 1595
攒了一身酷
攒了一身酷 2021-01-04 19:06

I have a function in one of my classes that compares itself with another instance of the same class - and finds out which variables differ. This is for the purpose of minimi

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-04 19:47

    Use StringUtils provided by apache

    StringUtils.equals(myString,comparisonObj.myString);
    

提交回复
热议问题