package javaapplication1;
public class StringConcatenation {
public static void main(String ar[])
{
String str ="Abhishek ";
String str1="Awasthi";
String str2=str+str1;
String str3=str.concat(str1);
String str4="My name is ".concat(str)+str1;
System.out.println(str);
System.out.println(str1);
System.out.println(str2);
System.out.println(str3);
System.out.println(str4);
}
}
0 comments:
Post a Comment