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

Answer Posted / govind

class stringadd
{
public static void main(String args[])
{
String a="hello";
System.out.println("the string is::"+a);
a+=" govind";
System.out.println("after concating::"+a);
}
}

Is This Answer Correct ?    10 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain listiterator and methods in listiterator?

552


What is purpose of keyword void?

570


What is the use of string and stringbuffer?

558


What does microservices mean?

538


What are the three parts of a lambda expression?

538






What is hashset in java?

537


Can a abstract class be declared final?

573


How can you say java is object oriented?

597


What are the features of junit?

604


Should a main method be compulsorily declared in all java classes?

539


What do you mean by an object in java?

637


What is toarray method in java?

562


If a class is declared without any access modifiers, where can the class be accessed?

601


What is a protected class in java?

547


What is difference between == equals () and compareto () method?

535