关于String的contains(null)问题 在使用contains的时候, 出现了空指针异常, 例如: "Memo".contains(null); 就会抛出NullPointerException空指针异常. 所以在使用的时候,contains()中的对象不能为null.