Consequentialism is one of the more favoured theories of morality. It says that in any situation, the right action is the one that will produce the best consequences. What is the best consequence, you might ask. Well, we also need a theory of value. Namely, we choose something that we value, such as happiness, and then we go on to act in a way which will produce the most happiness. This, the Consequentialist says, is what morality is all about.
But consider the following situation:
"Jim finds himself in the central square of a small South American town. Tied up against the wall are a row of twenty Indians, most terrified, a few defiant, in front of them several armed men in uniform. A heavy man in a sweat-stained khaki shirt turns out to be the captain in charge and, after a good deal of questioning of Jim which establishes that he got there by accident while on a botanical expedition, explains that the Indians are a random group of inhabitants who, after recents acts of protest against the government, are just about to be killed to remind other possible protestors of the advantages of not protesting. However, since Jim is an honoured visitor from another land, the captain is happy to offer him a guest's privilege of killing one the Indians himself. If Jim accepts, then as a special mark of the occassion, the other Indians will be let off. Of course, if Jim refuses, then there is no special occassion, and Pedro here will do what he was about to do when Jim arrived, and kill them all. Jim, with some desperate recollection of schoolboy fiction, wonders whether if he got holg of a gun, he could hold the captain, Pedro and the rest of the soldiers to threat, but it is quite clear from the set-up that nothing of that kind is going to work: any attempt at that sort of thing will mean that all the Indians will be killed, and himself. The men against the wall, and the other villagers, understand the situation, and are obviously begging him to accept. What should he do?”
What would you do? If Jim was a Consequentialist, he would kill. But imagine if, after murdering the Indian, Pedro turned around and said: "Ahaha! Jokes on you! I was only kidding about the special occassion; we'll proceed to execute the rest". Jim could not have anticipated this, and yet he thought that he was acting morally. Another problem for Consequentialist Jim is that he would kill his own mother, if she were that Indian.
 Smart, J.J.C., 1973, Utilitarianism: for and against, Cambridge University Press, pp. 98 - 99