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

What are sets in java?

0 Answers  


what is polymorphism with example?types of polymorphism?

15 Answers   HP, Sigma Solve,


A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.

0 Answers  


how to print the below in java?thanks in advance.... * * * * * * * *

3 Answers  


What is the significance of listiterator?

0 Answers  






Can a class declared as private be accessed outside it’s package?

0 Answers  


Why we cannot override static method?

0 Answers  


What is linked hashmap and its features?

0 Answers  


What is the multi-catch block in java?

0 Answers  


what is the difference b/w static and final methods?

1 Answers  


can any one tell me what is advantage of encapsulation

2 Answers  


what are the different non-access specifiers in java?

5 Answers  


Categories