Search This Blog

Monday, July 28, 2025

Java Strings - combining two strings

You have two strings, and you want to combine them into a single string, for example:

String s1="Hello";
String s2 = " World";

String s3 should have a combined value of Hello World

Which of the following methods of the String API can be used?

a) merge
b) join
c) concat
d) replace

Created By: Nancy N.
@16:45 28-Jul-12025

Subscribe to this blog for more...

No comments:

Post a Comment