I'm trying to understand this example in Hartshorne's algebraic geometry book
In order to prove the irreducible part, suppose $Y$ is an irreducible space and $Y'$ a open subset of $Y$ with $Y'=Y'_1\cup Y'_2$ with $Y'_1,Y'_2$ proper closed subsets. Then $Y=(Y-Y')\cup (Y'_1\cup Y'_2)$ contradiction because $Y$ is irreducible.
Am I right? I need help also in the density part, I'm really stuck I don't know even how to begin.
Thanks a lot.