In Hamlet, it could be argued, the female characters are more well-developed than in Catcher in the Rye. Though there are only two female characters of note in Hamlet -- Ophelia and Gertrude - we have a basic idea of what they are both about. We know Gertrude loves her son, but is also a bit selfish and foolish. We know some of her motivations and her capacity for guilt. The same can be said for Ophelia. We know some of her motivations and desies, at least in relation to Young Hamlet and Polonius, and we get to hear some of her thoughts and feelings.
Of the female characters in The Catcher in the Rye we know very little, except about Phoebe. Since the narration of the novel is entirely from Holden's perspective, we really don't know what the other people are thinking unless they say it aloud. We know some of Phoebe's thoughts (like how she wants to run away with Holden when he says he's going to leave), but we know almost nothing about the thoughts and feelings of Holden's mother, Sally Hayes, Jane Gallagher, or Sunny the prostitute. We only know how these female characters react to or are spoken about by Holden. We do not have their point of view.
Another important difference is that the two main female characters in Hamlet die, and both by their own hands (although Gertrude killed herself inadvertently, with a poisoned draught made by Claudius). None of the female characters in Catcher in the Rye die. The two female characters in Hamlet seem to love the main character, Young Hamlet, a great deal, while only Phoebe, and perhaps Holden's mother, love him. The rest of the female characters have varying amounts of regard or antipathy for Holden.
A major difference, though, between the female characters in these works is that we get to hear the women in Hamlet speak for themselves, while we only really get Holden's reportage of the female characters in The Catcher in the Rye.