Answer to Question #3485 in Java | JSP | JSF for Y mukundareddy
(1) Write a program to concatenate two strings?
1
2011-08-07T07:21:23-0400
public class StringConcatenator
{
public static void main(String[] args)
{
& String str1 = "Hello,";
& String str2 = " World!";
& String concat = str1 + str2; & // Concatenating of two strings
& System.out.println("First string = '" + str1 + "'");
& System.out.println("Second string = '" + str2 + "'");
& System.out.println("The concatenated string = '" + concat + "'");
}
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
JavaJSPJSF
Comments
Leave a comment