CodePudding user response:
Is null, how can have the username, you should first sample user setUsername againCodePudding 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