2. Given that the lengths of two altitudes of $\triangle A B C$ are 5 and 20. If the length of the third altitude is also an integer, then the maximum length of the third altitude is ( ).
(A) 5
(B) 6
(C) 7
(D) 8
2. B.

Let the area of $\triangle A B C$ be $S$, and the length of the third altitude be $h$. Then the lengths of the three sides are $\frac{2 S}{5}, \frac{2 S}{20}, \frac{2 S}{h}$.
Thus, $\frac{2 S}{5}-\frac{2 S}{20}<\frac{2 S}{h}<\frac{2 S}{5}+\frac{2 S}{20}$.
Solving this, we get $4<h<\frac{20}{3}$.
Therefore, the maximum integer value of $h$ is 6.