Let f:[a,b]→R be continuous. If f were not uniformly continuous, there would exist ε0>0 and sequences xn,yn∈[a,b] with ∣xn−yn∣→0 but ∣f(xn)−f(yn)∣≥ε0. By compactness of [a,b], after passing to a subsequence xn→x∗∈[a,b]. Then yn→x∗ as well since ∣xn−yn∣→0. Continuity of f gives f(xn)→f(x∗) and f(yn)→f(x∗), hence ∣f(xn)−f(yn)∣→0, contradicting ∣f(xn)−f(yn)∣≥ε0. So f is uniformly continuous.