File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/main/java/com/thealgorithms Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ private ReverseStringUsingStack() {
11
11
* @return reversed string
12
12
*/
13
13
public static String reverse (String str ) {
14
- if (str == null ) {
14
+ if (str == null ) {
15
15
throw new IllegalArgumentException ("Input string cannot be null" );
16
16
}
17
17
Stack <Character > stack = new Stack <>();
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public static String reverse3(String string) {
66
66
* and then pops them off to create the reversed string.
67
67
*/
68
68
public static String reverse4 (String str ) {
69
- if (str == null ) {
69
+ if (str == null ) {
70
70
throw new IllegalArgumentException ("Input string cannot be null" );
71
71
}
72
72
Stack <Character > stack = new Stack <>();
You can’t perform that action at this time.
0 commit comments