Which is the best way to use for String concatenation in
Java?
Answer Posted / leo zhao
Hi Manasa,
You can use append to concatenate more than 2 strings, such as
StringBuffer str = new StringBuffer("Stanford ");
str.append("Lost!!").append(" again.");
| Is This Answer Correct ? | 18 Yes | 2 No |
Post New Answer View All Answers
Explain the importance of import keyword in java?
What is meant by singleton class?
Can static methods access instance variables in java?
How is hashset defined in java?
Is list thread safe in java?
Which class should you use to obtain design information about an object in java programming?
Explain different types of thread priorities ?
Is special character in java?
What is the byte range?
Describe method overriding
What is the difference between an argument and a parameter?
How do you include a string in java?
How objects of a class are created if no constructor is defined in the class?
Can we overload the main() method?
What is the difference between integer parseint and integer valueof?