An example of foreshadowing is when Ralph decides to call the fat boy “Piggy.”
Piggy’s name foreshadows several things. It indicates that the boys will have little faith in, or respect for, the intelligent boy. He asks Ralph to call him anything but the mean name kids used to call him.
“I don’t care what they call me,” he said confidentially, “so long as they don’t call me what they used to call me at school.” (ch 1, p. 12)
Piggy tries to trust Ralph, but Ralph betrays him. He rarely listens to Piggy’s advice, and certainly does not respect him. In the long run, this foreshadows Piggy’s own death. After all, the boys on the island are obsessed with pigs. They hunt and kill pigs early on.
They found a piglet caught in a curtain of creepers, throwing itself at the elastic traces in all the madness of extreme terror. Its voice was thin, needle-sharp and insistent; The three boys rushed forward and Jack drew his knife again with a flourish. (ch 1, p. 40-41)
The pig is a symbol of the savagery the boys are descending into. Therefore Piggy’s name is no coincidence. It is an early indication that he is doomed, and so are the boys.