Both of them are good. The thing is, both of them are set in completely different generations. Friends came out in 1994, Brooklyn 99 in 2013. The humour can't be the same 19 years later. However, both of these have been liked by the audiences of both the generations.