Solved Brackets in java