I want to test if an input String is balanced. It would be balanced if there is a matching opening and closing parenthesis, bracket or brace.
example: {} bal
import java.util.*; public class Parenthesis { public static void main (String ...argd) { Scanner sc=new Scanner(System.in); System.out.println("enetr string"); String s=sc.nextLine(); Stack st=new Stack(); for (int i=0;i