Write a program which read two strings from keyboard and concatenate them and print it.

import java.io.*;
class equalmethod
{
    public static void main(String args[])
    {
        DataInputStream in=new DataInputStream(System.in);
        try
        {
            String s1=(in.readLine());
            String s2=(in.readLine());
            String s3=s1.concat(s2);
            System.out.println(s3);
        }
        catch(IOException e)
        {
        }
    }
}

0 comments:

Post a Comment

Digital Marketing

Subscribe to RSS Feed Follow me on Twitter!