Pages

Saturday 28 May 2011

// write a program in java which concatenate two string.

0 comments
 




CODE

import java.io.*;
public class CombinString{
public static void main(String[] args) throws IOException{
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter First String:");
String str1 = bf.readLine();
System.out.println("Enter Second String:");
String str2 = bf.readLine();
System.out.println("CONCATINATE TWO STRING!");
String com = str1.concat(str2);
System.out.println("CONCATINATE STRING: " + com);
}
}

OUTPUT DISPLAY





Leave a Reply