public
String concat(String str)
Return
a string that represents the concatenation of this object's
characters followed by the string argument's characters.
class StringConcat{ public static void main(String args[]){ String s1 = new String("abcd"); String s2 = new String("ABCD"); System.out.println(s1.concat(s2)); } }
Output
abcdABCD
No comments:
Post a Comment