I'm just new in Java programming and it's really confusing me that what's the return type of method append() in StringBuilder??
I've checked about the API documents on https://docs.oracle.com/javase/9/docs/api/index.html?java/lang/String.html and the return is "StringBuilder", so I should write the code like:
StringBuilder a=new StringBuilder("hello");
...(another StringBuilder object)=a.append("world");
and a will still be "hello", and another stringbuilder will become"helloworld" because it has a return value??
But actually a itself also become "helloworld". Why??Did I misunderstand something?