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
What is tree in java?
What are the features in java?
What is a method vs function?
Can you use this() and super() both in a constructor?
Which number is denoted by leading zero in java?
What is the purpose of final keyword and when to use it?
What is the char data type?
How do you empty a list in java?
define polymorphism in java
How we can execute any code even before main method?
What is the use of a copy constructor?
What is a boolean flag in java?
What is treeset and treemap in java?
How many tetrahedral voids are there in bcc?
Is java pass by value or pass by reference?