Skip to content

Commit 7c37707

Browse files
authored
Create doubleChar.java
1 parent d6f929f commit 7c37707

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

String-2/doubleChar.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
public String doubleChar(String str)
2+
{
3+
String r = "";
4+
for(int i = 0;i < str.length();i++)
5+
{
6+
r += (str.substring(i, i+1));
7+
r += (str.substring(i, i+1));
8+
}
9+
return r;
10+
}

0 commit comments

Comments
 (0)