Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How does multithreading take place on a computer with a single cpu?

998


Can a constructor call the constructor of parent class?

1027


What is local variable and instance variable?

1047


How will you initialize an Applet?

1136


What is the use of math abs in java?

1005


Why is inheritance used in java?

1103


Can we have more than one package statement in the source file?

1047


Can a class be private or protected in java?

1052


What is object class in java?

912


why we use merge option in hybernate pls give a ex snippet

1987


Difference between error and exception

6033


Can main() method in java can return any data?

1172


What is 16 bits called?

939


What are the different approaches to implement a function to generate a random number?

1051


What is token in java?

1007