We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b111de3 commit 6f3a0eaCopy full SHA for 6f3a0ea
src/main/java/com/thealgorithms/strings/ReverseString.java
@@ -66,7 +66,6 @@ public static String reverse3(String string) {
66
* and then pops them off to create the reversed string.
67
*/
68
public static String reverse4(String str) {
69
- // Check if the input string is null
70
if (str == null) {
71
throw new IllegalArgumentException("Input string cannot be null");
72
}
@@ -86,4 +85,4 @@ public static String reverse4(String str) {
86
85
87
return reversedString.toString();
88
89
-}
+}
0 commit comments