This sutta (minus the first two and the last two sentences) also appears at SN 36.19.

Thus have I heard. Once the Blessed One was staying at Savatthi, in Jeta's Grove, Anathapindika's monastery.[1] Then Carpenter Fivetools went to see the Venerable Udayi. Having saluted him respectfully, he sat down at one side. Thus seated, he asked the Venerable Udayi:

"How many kinds of feelings, reverend Udayi, were taught by the Blessed One?"

"Three kinds of feelings, Carpenter, were taught by the Blessed One: pleasant, painful and neutral feelings. These are the three feelings taught by the Blessed One."

After these words, Carpenter Fivetools said: "Not three kinds of feelings, reverend Udayi, were taught by the Blessed One. It is two kinds of feelings that were stated by the Blessed One: pleasant and painful feelings. The neutral feeling was said by the Blessed One to belong to peaceful and sublime happiness."

But the Venerable Udayi replied: "It is not two feelings that were taught by the Blessed One, but three: pleasant, painful and neutral feelings."

(This exchange of views was repeated for a second and a third time,) but neither was Carpenter Fivetools able to convince the Venerable Udayi, nor could the Venerable Udayi convince Carpenter Fivetools. It so happened that [the] Venerable Ananda had listened to that conversation and went to see the Blessed One about it. Having saluted the Blessed One respectfully, he sat down at one side. Thus seated, he repeated the entire conversation that had taken place between the Venerable Udayi and Carpenter Fivetools.

The Blessed One said: "Ananda, Udayi's way of presentation, with which Carpenter Fivetools disagreed, was correct, indeed. But also Carpenter Fivetool's way of presentation, with which Udayi disagreed, was correct. In one way of presentation I have spoken of two kinds of feelings, and in other ways of presentation I have spoken of three, of six, of eighteen, of thirty-six, and of one hundred and eight kinds of feelings.[2] So the Dhamma has been shown by me in different ways of presentation.

"Regarding the Dhamma thus shown by me in different ways, if there are those who do not agree with, do not consent to, and do not accept what is rightly said and rightly spoken, it may be expected of them that they will quarrel, and get into arguments and disputes, hurting each other with sharp words.

"Regarding the Dhamma thus shown by me in different ways, if there are those who agree with, consent to, and accept what is rightly said and rightly spoken, it may be expected of them that they will live in concord and amity, without dispute, like milk (that easily mixes) with water, looking at each other with friendly eyes.

"There are five strands of sense desire. What are these five? Forms cognizable by the eye that are wished for, desirable, agreeable and endearing, bound up with sensual desire and tempting to lust. Sounds cognizable by the ear... odors cognizable by the nose... flavors cognizable by the tongue... tangibles cognizable by the body, that are wished for, desirable, agreeable and endearing, bound up with sense desire, and tempting to lust. These are the five strands of sense desire. The pleasure and joy arising dependent on these five strands of sense desire, that is called sensual pleasure.

"Now, if someone were to say: 'This is the highest pleasure and joy that can be experienced,' I would not concede that. And why not? Because there is another kind of pleasure which surpasses that pleasure and is more sublime. And what is this pleasure? Here, quite secluded from sensual desires, secluded from unwholesome states of mind, a monk enters upon and abides in the first meditative absorption (jhana), which is accompanied by thought conception and discursive thinking and has in it joy and pleasure born of seclusion. This is the other kind of pleasure which surpasses that (sense) pleasure and is more sublime.

"If someone were to say: 'This is the highest pleasure that can be experienced,' I would not concede that. And why not? Because there is another kind of pleasure which surpasses that pleasure and is more sublime. And what is that pleasure? Here, with the stilling of thought conception and discursive thinking... a monk enters upon and abides in the second meditative absorption... in the sphere of the infinity of space... of the infinity of consciousness... of no-thingness... of neither-perception-nor-non-perception.

"If someone were to say: 'This is the highest pleasure that can be experienced,' I would not concede that. And why not? Because there is another kind of pleasure which surpasses that pleasure and is more sublime. And what is this pleasure? Here, by completely surmounting the sphere of neither-perception-nor-non-perception, a monk enters upon and abides in the cessation of perception and feeling. This is the other kind of pleasure which surpasses that pleasure and is more sublime.[3]

"It may happen, Ananda, that Wanderers of other sects will be saying this: 'The recluse Gotama speaks of the Cessation of Perception and Feeling and describes it as pleasure. What is this (pleasure) and how is this (a pleasure)?'

"Those who say so, should be told: 'The Blessed One describes as pleasure not only the feeling of pleasure. But a Tathagata describes as pleasure whenever and whereinsoever it is obtained.'"

That is what the Blessed One said. The venerable Ananda was satisfied and delighted in the Blessed One's words.[4]

Notes

Comy.: "From the fourth jhana onwards, it is the neither-painful-nor-pleasant feeling (that is present in these meditative states). But this neutral feeling, too, is called 'pleasure' (sukha), on account of its being peaceful and sublime. What arises by way of the five cords of sensual desire and by way of the eight meditative attainments is called 'pleasure as being felt' (vedayita-sukha). The state of Cessation of Perception and Feeling is a 'pleasure, not being felt' (avedayita-sukha). Hence, whether it be pleasure felt or not felt, both are assuredly 'pleasure,' in the sense of their being painfree states (niddukkhabhava-sankhatena sukhena)."

In AN 9.34, the venerable Sariputta exclaims: "Nibbana is happiness, friend; Nibbana is happiness, indeed!" The monk Udayi then asked: "How can there be happiness when there is no feeling?" The venerable Sariputta replied: "Just this is happiness, friend, that therein there is no feeling." The continuation of that Sutta may also be compared with our text. On Nibbana as happiness, see also AN 6.100.