Saturday 14 June 2014

concat (String str)

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


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment