Can calling methods on a new instance cause NPE?

后端 未结 0 1816
误落风尘
误落风尘 2021-02-04 01:43

Suppose I have a class like this:

public class A {
  private Map map;
  
  public A() {
    map = new HashMap<>();
  }

  String metho         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题