Which is the best way to use for String concatenation in
Java?

Answer Posted / sureshreddy

class String
{
public static void main(String args[])
{
String s1="hai";
String s2="suresh";
String s3=s1.concat(s2);
System.out.println(s3);

}
}

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why we used break and continue statement in java?

801


Is 0 a prime number?

745


Is ruby built on java?

722


Can a static method be overridden in java?

761


Can we write multiple catch blocks under single try block?

832


What is polymorphism in java? What are the kinds of polymorphism?

798


What is reverse function?

797


what is nested class in java?

834


What is the use of hashmap in java?

789


Does substring start with 0?

755


Is singleton a bad practice?

810


What is a lightweight component?

800


What is an iterator interface in java programming?

736


What is a jagged array in java?

789


What is outofmemoryerror in java?

766