Write a Java Program in below senario
Example 1:
Input : s ="()";
Output : true
Example 2:
Input: s = “() [] {}”
Output : true
Example 3:
Input : s = “(]”
Output : false
Example 4:
Input : s = “([)]”
Output : fasle
Example 5:
Input : s = “{[] }”
Output : true