In act 2, scene 2, Rosencrantz and Guildenstern meet with Hamlet for the first time since returning to Denmark, and Hamlet proceeds to ask them why they've chosen to visit a prison. When they question Hamlet about his comment, Hamlet reiterates that Denmark is a large prison with many cells and dungeons. Hamlet refers to Denmark as a prison, because he feels trapped and isolated in the kingdom and cannot leave to attend the University of Wittenberg. Hamlet is under Claudius's constant supervision as Polonius, Rosencrantz, and Guildenstern spy on him. Similar to a prisoner, Hamlet feels like he is in danger because he lives in close proximity to the man that murdered his father. Hamlet cannot trust anyone, except for Horatio, and feels completely alienated in Denmark. Similar to a prisoner, Hamlet is not free to travel and is constantly followed by Claudius's subjects. Overall, Hamlet compares Denmark to a prison because it is a dangerous, ominous place, where he is under Claudius's constant supervision and cannot trust anyone.