NullPointerException空指针异常

Main.java

package chapter417;

public class Main {
    public static void main(String[] args) {
        String str = null;
        if (str.equals("")) {
            System.out.println("blank");
        } else {
            System.out.println("null");
        }
    }

}
 

 

NullPointerException空指针异常

相关文章:

  • 2022-02-15
  • 2021-11-29
  • 2021-11-27
  • 2022-02-18
  • 2021-10-03
  • 2021-05-18
  • 2021-08-17
猜你喜欢
  • 2021-06-24
  • 2021-08-15
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案