The short story "A Hunger Artist" by Franz Kafka is an allegory that can be interpreted several different ways. Kafka begins the tale by reminiscing about a time in the past when professional hunger artists were popular and crowds would come to watch them.
The hunger artist of the title seems to take his job seriously. Although people are assigned to watch him so that he doesn't eat, he wouldn't think of secretly eating during a period of fasting. In fact, he would like to fast longer than the forty-day limit that his boss has set. When the forty-day period is up, there is a well-attended ceremony during which the hunger artist is supposed to break his fast. However, he is miserable during these times, reluctant to eat and wanting only to extend his fast.
Eventually fasting professionally goes out of fashion. The public goes on to other attractions. The hunger artist moves to a circus where he is mainly ignored. He finds one benefit in the arrangement, though, for he is allowed to fast as long as he wants. He continues to fast for a long time, but nobody pays any attention to him. The circus owner finally finds him near death in the straw of his cage.
To be able to understand the ending, it is important to understand that there are several possible interpretations of Kafka's intent in this story. Some critics see the hunger artist as a spiritual ascetic who fasts as a repudiation of the pleasures of the world. Other critics see the story as autobiographical; Kafka may have meant the deprivations of the hunger artist as representative of what writers and artists have to go through in the act of creation.
When the circus owner finds the almost-dead hunger artist, the hunger artist says, "Forgive me." He then goes on to say that "I always wanted you to admire my fasting" but "you shouldn't admire it." The hunger artist explains that he has been fasting not because it takes any great effort, but rather because "I couldn't find the food I liked." In other words, all this time, the hunger artist has been deceiving the public and perhaps even himself. He has been adulated and admired as a person who can do something difficult that no one else can do, when in fact it is easy for him because he simply doesn't like to eat. The hunger artist confesses that if he had found food he liked, he would have eaten like everyone else. After the hunger artist dies, the circus owner replaces him with a panther, which everyone seems to enjoy more.
Kafka ends the story ambiguously, and like the rest of it, the ending is open to various interpretations. You might interpret it as meaning that spiritual ascetics and artists have difficult lives and do not get the appreciation they deserve, or you can interpret it more cynically and conclude that the hunger artist is forgotten because ultimately what he attempted had no value and was only done out of self-aggrandizement.