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 callable java?
What is the size of an array?
What does snprintf return?
What does singleton class mean?
How to provide security in java
What is map and hashmap in java?
What are the disadvantages of object oriented programming?
What is time complexity java?
How we can skip finally block of exception even if some exception occurs in the exception block in java?
What is style and indentation?
How can we make string upper case or lower case?
Is there a case when finally will not execute?
Difference between error and exception
Explain where variables are created in memory?
Why does java not support pointers?