这个算是java的bug吗


package test;

import java.util.Map;

public class Test {
	public static void main(String[] args) {
		Map m = null;
		System.out.println("haha" + m==null?"null":m.get("d"));
	}
}


运行后:
Exception in thread "main" java.lang.NullPointerException
at test.Test.main(Test.java:8)

你可能感兴趣的:(java)