Create a program that will accept three strings from a user and display the concatenated string.

public class ConcatStrings
    public static void main(String args[])throws IOException
	   String newStr;
	   InputStreamReader obj=new InputStreamReader(;
	   BufferedReader objectBR=new BufferedReader(obj);
	   System.out.printIn("Enter First String");
	   String str1=objectBR.readLine();
	   System.out.printIn("Enter Second String");
	   String str2=objectBR.readLine();
	   System.out.printIn("Enter third String");
	   String str3=objectBR.readLine();
	   System.out.printIn("The Concatenated string is:"+newStr);

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Show Buttons
Hide Buttons