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
Can an interface have a class?
What will happen to the exception object after exception handling?
What is the purpose of the finally clause of a try-catch-finally statement in java programming?
why Interface used?
Can inner class have constructor?
What is difference between length and length() method in java ?
What are different types of states exist for a thread?
List the different types of classloaders in java.
What is the difference between variable declaration and variable initialization?
What is the program compilation process?
Are registers volatile?
List the features of java programming language.
What does I ++ mean?
How will you reverse a singly-link list?
How to sort an array from smallest to largest java?