Which is the best way to use for String concatenation in
Java?

Answer Posted / harshal

'+'operator is the best way to concatenate bcz by using
this operator we can concatenate more than two strings.
This is not possible by using concat method.
But performanace wise "append" is better than "+".

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the purpose of the runtime class?

779


What is the use of private static?

775


How do you write a conditional statement?

707


What is a method vs function?

748


How to sort elements in a parallel array in java?

685


How do I get 64 bit java?

713


What is the meaning of I ++ in java?

844


what is the final keyword denotes in java?

790


Can memory leak happen java?

783


Explain about interthread communication and how it takes place in java?

776


Difference between concurrent hashmap and hashtable and collections

795


What is the use of isempty in java?

763


Is java util list serializable?

708


What is a literal coding?

731


Can a class have multiple subclasses?

800