which class to use when concatenating
strings in a loop.

Answers were Sorted based on User's Feedback



which class to use when concatenating strings in a loop...

Answer / geeta

StringBuffer

Is This Answer Correct ?    7 Yes 0 No

which class to use when concatenating strings in a loop...

Answer / sitaram

string buffer and string builder classes are used to
concatenate the two or more strings in a loop.

Is This Answer Correct ?    1 Yes 0 No

which class to use when concatenating strings in a loop...

Answer / 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

More Core Java Interview Questions

Why can't we override private static methods?

0 Answers  


Can you make an instance of an abstract class?

5 Answers   Accenture,


What are Normalization Rules? Define Normalization?

0 Answers  


how to handled exceptions & erros in ejb?

1 Answers   Satyam,


What are the 3 types of control structures?

0 Answers  


how to convert mm/dd/yy to dd/mm/yy using collections in java.

4 Answers   Bosch,


What is the synonym of framework?

0 Answers  


how a marker interface gets its functionality and when we implements a marker interface how it got invoked

3 Answers   Mind Tree,


What is unmodifiable collection in java?

0 Answers  


Which is faster string or stringbuilder?

0 Answers  


What are static initalizers in java ?

0 Answers  


Can we make the abstract methods static in java?

0 Answers  


Categories