Foreshadowing is a literary device that gives a hint to the reader as to what might happen later in the story. In Stockton's "The Lady, or the Tiger?" one instance of foreshadowing is based on the king's character. In the beginning it says that the king is semi-barbaric and that whenever he didn't get his way, he didn't pull a fit or do anything emotionally charged, he simply tossed someone into his arena and let fate take care of the problem. In addition, the king believed that his method of justice in the arena was "impartial and incorruptible." These two words are used a few times to show how firm the king believed in this system. Not only that, but he strongly believed that the system was completely flawless because no one could influence the outcome of the victim's choice.
There are two points of foreshadowing here. First, the king's belief in his system of justice is so strong, that even when his daughter's lover is on the line, based on what is said earlier in the text, the reader knows that he won't grant him mercy for any reason--especially not for love. Second, the fact that the king believes his system is incorruptible is just begging to be challenged later on in the story--and it is. The princess finds a way to corrupt the system because she discovers which door the lady will stand behind. In an ironic twist of chance, the decision behind the lover's fate lies solely in the hands of the princess, not necessarily in the arena, and certainly not with the king.