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

Why javac is not recognized?

531


What is string made of?

535


What was java originally called?

520


How many return statement are allowed in a function?

465


What does ide stand for?

529






Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?

551


What is public static?

504


Can vector have duplicates in java?

516


What is a numeric literal?

535


What happens when a thrown exception is not handled?

586


how its run?

579


Is there any limitation of using inheritance?

575


What is the basic concept of java?

545


What is an example of character?

561


How is the marker interface used in Java?

616