Tom Hanks was in a joking mood last night on “The Late Show with David Letterman,” even when he told Dave he was recently diagnosed with Type 2 diabetes.

Hanks, who last lost weight recently, explained the diagnosis by saying his doctor told him, “You’ve graduated. You’ve got Type 2 diabetes, young man.”

The “Captain Phillips” star revealed he’d been struggling with high blood sugar for over 20 years and that his condition is “controllable.”

Hanks said his doctor told him he needed to weigh what he did in high school in order to attain complete health, which Hanks countered with, “And I said to her, ‘Well I’m gonna have Type 2 diabetes. There was no way I was gonna weigh what I weighed in high school. I was 96 pounds.”