In a triangle, the length of the midsegment (like XY in your problem) that connects the midpoints of two sides (here, sides AB and AC) is parallel to the third side and is half the length of that side.
Given that XY = 16 units, we can set up the relationship based on the properties of the midsegment:
\[ XY = \frac{1}{2} AC \]
Since XY is equal to 16 units, we can substitute that into the equation:
\[ 16 = \frac{1}{2} AC \]
To solve for AC, multiply both sides by 2:
\[ AC = 16 \times 2 = 32 \]
Therefore, the length of AC is
\[ \boxed{32} \text{ units.} \]