PROGRAM FOR CONCATENATE TWO STRING

This is the programe concatenating of two stings by using concat method in programe

1
2
3
4
5
6
7
8
9
10
11
12
13
14
import java.io.*;
public class ConStr
{
      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();
            String com = str1.concat(str2);
            System.out.println("Combined string: " + com);
      }
}

Output :Concatenate String
oddeven