In this blog, Sharing code to check whether Parenthesis or Brackets are correct in a string or not.Consider a String”[()]” should return “Parenthesis check Passed” while String “{()[(]))”should return “Parenthesis check Failed”. CODE EXPLANATION:1. Created two String OpenBracketStr and CloseBracketStr.2. Keep on Appending based on Character present in the String. If its a opening Bracket, it will be added to OpenBracketStr and as we have received Open Bracket type, I am adding a Expected Closed Bracket by myself in String called CloseBracketStr. In case I get 5 Opening bracket consecutively…