Skip to content

Commit 0c3db38

Browse files
authored
Refactor main method for FirstLetterUppercase
1 parent a6df1c6 commit 0c3db38

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎FirstLetterUppercase.java‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ public static void main(String[] args) {
44
String word = "HeLlo vSSS";
55
String[] words = word.split(" ");
66
String uppCase = "";
7-
if (word == null || word.isEmpty()) {
8-
return;
9-
}
7+
8+
if (word == null || word.isEmpty()) return;
9+
1010
for (String i : words) {
1111
uppCase += i.substring(0, 1).toUpperCase() +
1212
i.substring(1).toLowerCase() + " ";
1313
}
14+
1415
System.err.println(uppCase);
1516

1617
}

0 commit comments

Comments
 (0)