Nullpointer exception

前端 未结 5 1785
予麋鹿
予麋鹿 2020-12-02 01:05

There is a possiblity that this may be a dupicate question. I initialize a String variable to null.I may or may not update it with a value.Now I want to check whether this v

5条回答
  •  无人及你
    2020-12-02 01:33

    I am comparing s==null only

    can you show the code snippet that you have written s==null will never throw a NPE

提交回复
热议问题