I created a sample application in java which concatenates three strings and displays the result in a final string.
Check the code:-
public class conCat
public static void main (String args)
String Message1 = "This ";
String Message2 = "is a Sample ";
String Message3 = "Application";
String Message = Message1 + Message2 + Message3;
This is a Sample Application
And the three strings are concatenated to the final string "Message" only.
How to concatenate them vertically?
The required output is :
is a sample
Kindly provide me the solution.