4. The area of the figure enclosed by the curve determined by the equation $|x-1|+|y-1|=1$ is
(A) 1
(B) 2
(C) $\pi$
( D ) 4
(B)
4.【Analysis and Solution】For expressions containing absolute values, discuss in cases to remove the absolute value symbol, obtaining four line segments.

They determine a curve that is a square with vertices at $(1,0),(2,1),(1,2),(0,1)$, with a side length of $\sqrt{2}$, thus the area is 2.