Recall the definition of absolute value: [tex]|x|=x[/tex] if [tex]x\ge0[/tex]. This means
[tex]\displaystyle\int_0^2|x|\,\mathrm dx=\int_0^2x\,\mathrm dx=\frac{x^2}2\bigg|_0^2=\boxed2[/tex]