Skip to content

Commit f56c249

Browse files
committed
fix: remove redundant main method to satisfy PMD rules
1 parent 12286cf commit f56c249

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/main/java/com/thealgorithms/stacks/ValidParentheses.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ private ValidParentheses() {
1414
/**
1515
* Returns true if the input string has valid parentheses.
1616
*
17-
* @params the string containing parentheses
17+
* @param s the string containing parentheses
1818
* @return true if valid, false otherwise
1919
*/
2020
public static boolean isValid(final String s) {
@@ -39,11 +39,4 @@ public static boolean isValid(final String s) {
3939
}
4040
return stack.isEmpty();
4141
}
42-
43-
public static void main(final String[] args) {
44-
System.out.println(isValid("()[]{}")); // true
45-
System.out.println(isValid("(]")); // false
46-
System.out.println(isValid("([)]")); // false
47-
System.out.println(isValid("{[]}")); // true
48-
}
4942
}

0 commit comments

Comments
 (0)