Throws:
NullPointerException - if str is null.
( where does all that code come from? Is that what Java turns into when you compile it? )
Notice (and remember for future questions) that if the length of the string to concatenate is 0 (an empty string ��), concat does not create a new String object. Instead it returns �this�, the original String object.
SCJP 1.4, SCWCD, SCBCD, IBM XML, IBM Websphere 285, IBM Websphere 287
because reference to append is ambiguous in this case: both method append(String s) and append(char[] c) of StringBuffer match s2.append(null).
SCJP 1.4, SCWCD, SCBCD, IBM XML, IBM Websphere 285, IBM Websphere 287
will generate a compiler error:
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |