Poetry in literature

What I Hamlet talking about in his “ To be or not to be “ soliloquy?