At first glance, Holden's situation could be judged so "trivial" in comparison with that of Hamlet that we would have few points of comparison. In Hamlet betrayal takes the form of murder, coverup, and conspiracy. To equal the gravity of this in a mid-twentieth-century setting, The Catcher in the Rye would have to be transformed into a thriller or a detective story such as those of James M. Cain or Raymond Chandler. (I'm thinking specifically of the story of Double Indemnity, in which the teenaged Lola knows her stepmother killed her mother but can't prove it.) Holden's sense of betrayal and deception are of a different order entirely, of course.
Nevertheless, the common element between Hamlet and Holden is that both regard the entire circle of people around them as phonies. It's not just people but symbols and institutions that are seen this way. Holden regards the prep-school milieu as nonsense: Pencey Prep and its reputation are "strictly for the birds." The other students are insiders, cliquish people who are phonies, like the athletes who all "stick together." The adults, even a supposedly well-intentioned person like Mr Antolini, end up being false as well, though in this case it's somewhat ambiguous. Holden seems to dislike everyone except his sister, Phoebe. He feels betrayed and deceived by not only the adults and the establishment they represent but by the outside world as a whole.
So does Hamlet. Though the deceptions in the play are more serious and threatening than anything Holden has to deal with, Hamlet's distrustful and dismissive attitude towards nearly everyone is similar. Not only Claudius—who has murdered Hamlet's father—but Polonius, Laertes, Gertrude (Hamlet's own mother), Rosencrantz, Guildenstern, and practically the entire court, including Ophelia, the woman he says he loved (though he has denied it to her face) are mistrusted by Hamlet. All of these people seem false and deceptive to him. Life itself is a kind of deceit or betrayal, as Hamlet sees it. He questions why we should even continue in this life and finds it so worthless that the only thing keeping us here is the fear of death, "the undiscovered country, from whose bourne no traveller returns." It seems a more complete sense of life having rejected him than what we observe in Holden Caulfield.