Note: The construction (Y) 不亦 (X) 乎 means, “isn’t Y X?”, or, more wistfully, “Y … isn’t it X?”
子曰。
學而時習之、不亦說乎。
有朋自遠方來、不亦樂乎。
人不知而不慍、不亦君子乎。
The Master said,
“Learning, and then frequently practicing, isn’t it a pleasure?”
“To have one’s friends visit from afar, isn’t it a joy?”
“To be unknown without resentment, isn’t this [the sign of] a person of great virtue?”