The method isEmpty() is undefined for the type String/String类型的isEmpty报错

原因是:JDK版本问题,JDK1.5中的String 类型变量没有isEmpty方法,而JDK1.6中有这个方法,所以只要把你的JDK版本改成1.6的应该没问题。
原文地址:https://www.cnblogs.com/tv151579/p/2512334.html