"Hamlet" was written by William Shakespeare more than four hundred years ago; it does not seem likely that this play will have anything in common with George Orwell's rather futuristic novel, "1984." In fact, there are several points of comparison between the two works, and they do share several common themes. The most obvious similarity of theme between the two works is the idea of reality versus unreality (appearance versus reality and reality versus illusion).
In Winston's world, Big Brother and the Party are constantly manipulating truth to suit their purposes. People are created or eliminated based on the whim or expediency of the Party, and history is constantly made, remade, and made again to suit the Party's current position. While others not be disturbed by these shifting realities, Winston finds them unsettling and they add to his distrust of the Party.
In Hamlet's world, Hamlet is conflicted between madness and reality. He warns his friends early on that he is likely to put on an "antic disposition" and he does seem to do so; however, one of the most-asked questions about the play is whether Hamlet is mad or "mad in craft." He wants to believe the Ghost's assertion that Claudius killed King Hamlet to get the throne (and Gertrude), but the word of a ghost (even if he does seem to be the ghost of his own father) may not be real. Hamlet distrusts his own mind in the matter of Claudius's guilt because he is not always able to discern what is real and what is not.
Two other ideas which can be found in both works include the protagonists' isolation in their surroundings and both Hamlet and Winston living in an environment of moral corruption.