Redundant Parentheses

mport java.util.; public class Main { public static boolean check(String s){ Stack st=new Stack<>(); char[] str=s.toCharArray(); for(char ch:str){ if(ch==’)’){ char top=st.peek(); st.pop(); boolean flag=true; while(top!=’(’){ if(top==’+’ || top==’-’||top==’/’||top==’’) flag=false; top=st.peek(); st.pop(); } if(flag==true) return true;} else{ st.push(ch);} }return false; } public static void find(String stri){ boolean ans=check(stri); if(ans==true){ System.out.println(β€œYes”); } else System.out.println(β€œNo”);} public static void main(String args[]) { try{ Scanner sc=new Scanner(System.in); int t=sc.nextInt(); for(int i=0;i<t;i++){ String stri=sc.nextLine(); find(stri); } } catch(Exception e){System.out.println(e);} } } i cannot understand what is error in this code.