isEmpty()与equals()、==“”区别

isEmpty方法源码:
public static boolean isEmpty(String str)
{
return (str == null) || (str.length() == 0);
}
isempty表示根本不存在,没有分配内存
“”表示存在(分配内存)但内容为空,一般是指字符串、数字变量的

原文地址:https://www.cnblogs.com/tobey/p/4606913.html