Skip to content

Commit 0c8c846

Browse files
authored
Merge pull request #47 from hitesh181/main
Added java program to convert string to lower case
2 parents e145051 + 2b25423 commit 0c8c846

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

String to LowerCase.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Initial template for Java
2+
3+
import java.util.*;
4+
import java.io.*;
5+
6+
class GFG {
7+
public static void main(String args[]) throws IOException {
8+
BufferedReader read =
9+
new BufferedReader(new InputStreamReader(System.in));
10+
System.out.println("Enter no of words you want to check");
11+
int t = Integer.parseInt(read.readLine());
12+
13+
while (t-- > 0) {
14+
System.out.println("Enter Word to conver to lowercase");
15+
String S = read.readLine();
16+
Solution ob = new Solution();
17+
18+
System.out.println(ob.toLower(S));
19+
}
20+
}
21+
}// } Driver Code Ends
22+
23+
24+
// User function template for Java
25+
26+
class Solution {
27+
static String toLower(String S) {
28+
String S1=S.toLowerCase();
29+
return S1;
30+
}
31+
32+
}

0 commit comments

Comments
 (0)