question: private static String removeBrackets ( String subQuery ) { if ( subQuery . indexOf ( '(' ) == 0 && subQuery . lastIndexOf ( ')' ) == subQuery . length ( ) - 1 ) { return subQuery . substring ( 1 , subQuery . length ( ) - 1 ) ; } return subQuery ; }
target:  Removes the first and the last bracket from the sub-query.