Home > Back-end >  Bug
Bug

Time:03-27

Judge the user asks for leave, here is empty, why not do the following if statement and end the program directly display null pointer exception

CodePudding user response:

Is null, how can have the username, you should first sample user setUsername again

CodePudding user response:

Carried out, is only the second line (user setUsername (name) null pointer exception).

CodePudding user response:

Judgment is wrong is not the same as the if (the user!=null)

CodePudding user response:

User=null then performs to null. The username directly null pointer is over