private String solveExpWithBrackets(String expWBrac) throws Exception {
        //For String concatenation.
        StringBuilder strToSolve = new StringBuilder();

        //Expression contains brackets.
        while (expWBrac.contains("(")) {
            //Find first bracket.
            int firstBrac = expWBrac.indexOf("(");
            //Append everything before openning paranthesis.
            strToSolve.append(expWBrac.substring(0, firstBrac));

            //If neither the string starts with a paranthesis,
            //nor operator exist before parantheses,
            //append a multiplication sign.
            if (!expWBrac.startsWith("(")
                    && !isOperator(expWBrac.charAt(firstBrac - 1))) {
                strToSolve.append(MULTIPLY_SIGN);
            }

            //Find matching bracket.
            int matchBrac = findMatchingBracketIndex(expWBrac, firstBrac);
            //Solve what's inside brackets.
            String temp = selectAndSolve(
                    expWBrac.substring(firstBrac + 1, matchBrac)
            );
            //Append it.
            strToSolve.append(temp);

            //If not the character after selected paranthesis is an operator,
            //append a multiplication sign.
            if (!(expWBrac.length() - 1 == matchBrac)
                    && !isOperator(expWBrac.charAt(matchBrac + 1))) {
                strToSolve.append(MULTIPLY_SIGN);
            }

            //Remove everything added to strToSolve from expWBrac,
            //if there is any remainning characters.
            expWBrac = expWBrac.substring(matchBrac + 1);
        }

        //Append remains if any.
        strToSolve.append(expWBrac);

        //Solve and return the final strToSolve.
        return selectAndSolve(strToSolve.toString());
    }