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 static import in java? Explain
What is a dot notation?
Does java map allow duplicates?
Why arraylist is not synchronized in java example?
Give reasons supporting that string is immutable.
Can we override private method?
What is the console in java?
What is boolean flag in java?
What is the covariant return type?
What is difference between ++ I and I ++ in java?
Define reflection.
How to convert string to char and vice versa?
What is used of static keyword in java?
Can we declare a class as static?
what is daemon thread and which method is used to create the daemon thread? : Java thread