• + 1 comment
    else if(str.charAt(i)==']' && s.peek()=='[' && !s.empty())
    

    Please reply .. If we write the statement on either side of && as the order shown above ( peek before and empty after) , it is showing runtime error . Is the order of statement also important in writing these expressions ?