how we can write the string concatenation program in java.

Answer Posted / sreekanth

public class StringConcat{
public static void main(String args[]){
String str1="abc";
String str2="def";
String str3=str1.concat(str2);
System.out.println(str3);
}}

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the protected method modifier?

560


What is numeric data type?

523


What does += mean in java?

570


What does java final mean?

519


What is the purpose of garbage collection in java, and when is it used?

559






What is length in java?

566


Why is the singleton pattern considered to be an anti pattern?

469


What is a dynamic array in java?

560


Where is jre installed?

584


what is meant by abstract class?

646


Explain the use of volatile field modifier?

630


What is the difference between stored procedure & function?

542


What is a percentage sign called?

615


Is java based on c?

528


How do you sort data in java?

518