Bill Cosby I Know the Best Hangover Cure ... And It's Not Jell-O

3/8/2014 12:16 AM PST

Beans, beans, the magical fruit ... the more you eat, the more you ... boot a hangover -- at least that's what Bill Cosby says.

The 76-year-old TV legend was promoting a chili restaurant Thursday in Arlington, Virginia ... and our photog asked for his advice on how to cure a hangover.

Cosby had a quick, enthusiastic answer -- but his opinion is a little biased.

We hear Jell-O shots work too.