This sentence means:
There are three kinds of helpful friends and three kinds of harmful friends. It is beneficial to make friends with upright people, make friends with honest people, and make friends with knowledgeable people. It is harmful to make friends with flattering people, with people who flatter others but slander others behind their backs, and with people who are good at smooth talk.
Source: "The Analects·Chapter 16·Ji's Chapter"
Extended information:
In "The Analects" Confucius repeatedly emphasized the careful selection of "friends" , in particular, it is proposed to distinguish between "beneficial friends" and "harmful friends". Choosing friends carefully does not mean only making friends of one taste. Social relationships and social life are rich and colorful. If you only make friends with one type of friends, or only make friends with people of one taste, your life will become dull and monotonous, and your vision will be too narrow. This is also not conducive to the perfection of life and career. develop.
It can be seen that friends should be divided into different levels. They should analyze the specific situation in detail and should not seek to blame them all. It is beneficial to make friends with people at different levels in different situations. It is worth explaining that there are levels of friends, and there is no distinction between high and low friendships. The level of a friend is determined by a person's ability, knowledge, and opportunities, while the way of friendship is determined by the friend's inner character. Therefore, Confucius emphasized that no matter what level of friends you make, you must first look at their inner character.