Why does Yoda take pills?
Q: Why does Yoda take pills?
A: BECAUSE HE'S OLD!!
This is an example of anti-humor, and also this is a joke making fun of old people. The setup for the joke (a standard Q and A riddle setup) makes it seem like the punchline will probably be a lame pun, but the answer is a moderately straight answer to the question, which makes it an example of anti-humor.
The reason why it is not 100% anti-humor is because saying that someone takes pills because they are old is a stereotypical response - it doesn't actually tell you why specifically he has to take pills. There are many reasons for taking pills, and being old is not one of them, however, being old does make it more likely that you will have a reason to take pills.