In the story's final sentence, what does Sammy mean when he says, "I felt how hard the world was going to be to me hereafter"?
Sammy, having quit his job on a whim to impress the girls who have come into the store improperly dressed, stands outside now, realizing that he has just made his life a lot harder. He has no job. If he does not want to follow the rules of the game, if he chooses to go his own way and opposes the standards, the rules that govern society, he will find himself on the outside all the time.
Sammy has learned that choices have consequences. Some choices need to be made more carefully, with greater consideration for the possible outcomes.
Sammy is young and immature, he does not understand that there are times that an individual has to keep his opinions to himself in an effort to follow the rules that govern an environment. He will learn that there is a time and place for his opinions and beliefs, but that expressing them all the time without discretion will result in him being fired, excluded or ostracized from polite society.
Sammy will learn as he grows and matures that sometimes it is better to keep your opinion to yourself. You can think anything you want, just be careful what you say out loud.
Sammy has just realized that he lives in a world where heroism is often not rewarded nor even noticed. He has just quit his job in protest because the A & P's manager, Lengel, has chided three young girls for entering the store in their bathing suits. Sammy hopes to impress their beautiful leader, whom he calls "Queenie," but she does not notice his sacrifice. When Sammy emerges from the store after quitting, the girls have left, and back inside the store work continues as usual. Sammy's sacrifice will change no one's life but his own.