Answer: $\mathbf D$
Solution:
$|y|=x \Rightarrow x=-y,\; \forall y<0$
and, $x=y, \;\;\forall y>0$
The domain is $x >= 0\;\because$ the left side is non-negative.
So graph $y=x\;\;\forall x >= 0$, and $y=-x\;\;\forall x >= 0$ .
$\therefore \mathbf D$ is the right option.