Skip to content

Commit 4d49764

Browse files
committed
feat: Mirror a string by concatenating it with itself for multiple test cases
🧠 Logic: - Read the number of test cases `t`. - For each test case: - Read a string `s`. - Create a new string `x` by concatenating `s + s`. - Print `x`. 📌 Purpose: Demonstrates string manipulation using concatenation in Java and looping through multiple inputs efficiently. Signed-off-by: Somesh diwan <[email protected]>
1 parent 39421b1 commit 4d49764

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Section6StringClassPrinting/src/StringConcationation.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
public class StringConcationation
2-
{
3-
public static void main(String[] args)
4-
{
1+
public class StringConcationation {
2+
public static void main(String[] args) {
53
String s = "5";
64
System.out.println(s + 5);
75
}

0 commit comments

Comments
 (0)