Henry Wong wrote:
What about append() with charsequence, string buffer, or char array? Can't those also take null? Give those five append() methods, which one is the most specific?
No,when compiling the above code I'm getting
reference to append is ambiguous, both method append(java.lang.String) in java.lang.AbstractStringBuilder and method append(java.lang.StringBuffer) in java.lang.AbstractStringBuilder match
i have compiled it...got that ambiguity error....i was just trying to find out what happens if the call goes to object argument method...but later understood that string and stringubuffer are more specific than it...
Joined: Sep 06, 2009
well the compiler shows that ambiguity is between stringbuffer and string methods