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

How to create an interface?

0 Answers  


What is the difference between call by reference and call by pointer?

0 Answers  


what are the uses of Class class and what it returns? explain it with the example code.

1 Answers  


Explain the selection sort algorithm?

0 Answers   Hexaware,


When garbage collector invokes object?s finalize() method?

5 Answers  


What is exception handling in java?

0 Answers  


Explain tree set and its features?

0 Answers  


How many days will it take to learn java?

0 Answers  


What is are packages?

0 Answers  


Write a function to print Fibonacci series and Tribonacci series?

0 Answers   Hexaware,


How do you set security in applets?

1 Answers   Wipro,


Can we store variables in local blocks?

0 Answers   Global Logic,


Categories