String constructor with null value

why String (String) constructor with null value cause compile-time error? I think there is 2+ constructor that takes Object and when init. it with null it doesn't know which to start. I'm wonder if there is another reason

String s = new String(null); // compile time error


StringBuffer sb = new StringBuffer(null); // no error
9
задан Adeel Ansari 7 May 2011 в 04:47
поделиться