which class to use when concatenating
strings in a loop.
Answer Posted / narasimha
we any use the both classes String and StringBuffer.
but if we use StringBuffer it would be advatagebecase we
are going to create only one Object.if we use the String
class it is going to create the one for each itration.now
it up to you which one to use
| Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
What are data structures in java?
What type of variable is error flag?
Define how does a try statement determine which catch clause should be used to handle an exception?
What is object cloning in Java?
What are recursive functions?
What is contract between hashcode and equal method?
What is an example of procedure?
What is bytecode verifier?
How does map works in java?
What data structures are used to perform recursion?
What class allows you to read objects directly from a stream?
What invokes a thread's run() method in java programming?
what is aggregation in java?
What is character in data type?
Why should we use singleton pattern instead of static class?