Joke Collection Website - Talk about mood - "".equals(name) and name.equals ("") and name == null? How to use it?

"".equals(name) and name.equals ("") and name == null? How to use it?

"".equals(name) and name.equals ("") are the same, and there is no difference. Judging whether it is an empty character is different, such as name == null and name.equals (""). If you are a string of spaces in a string name, then name==null does not hold, but name.equals ("") does.