This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I have recently started using JDK1.5. I used to have code like the following :
This works fine in JDK1.4. However, when this is recompiled with 1.5.0_06, i get a compile time error at line ** "Type mismatch: cannot convert from AbstractStringBuilder to StringBuffer"
This is unexpected as the append method returns a StringBuffer object, not AbstractStringBuilder object. Also, if you pass in a char ('c'), i get a compiler error "Cannot convert from Appendable to StringBuffer", even though again the append(), method returns a StringBuffer object.
Has anyone seen this before or can anyone explain why the method is returning a different object to that which its signature defined.