Pounding at a thick stone wall won't move it, sometimes, you need to step back to see the way around.
Matthew Phillips
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Matthew Phillips
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Originally posted by Michael Pearson:
Since StringBuffers are mutable appending does not create new Objects.
[ April 08, 2002: Message edited by: Michael Pearson ]
Originally posted by Michael Matola:
Now here's a question:
But what if the destination array isn't big enough? Within Java code, arrays aren't resizable, right? So does arraycopy() have the ability to behind-the-scenes increase the size of an array, or is it creating a new char[] array whenever the destination array isn't big enough?
Originally posted by Marilyn deQueiroz:
How many Objects are created here?
A StringBuffer object is created and within that a char[] object. Then a String object
is created and within that a char[] object.
Four objects.
This looks like one of those certification questions.[/QB]
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Well don't expect me to do the dishes! This ad has been cleaned for your convenience:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
|