Acting was fairly new to Will Smith at the time The Fresh Prince of Bel-Air premiered, so he used to memorize the lines of everyone in the entire cast so that he would not forget his own. If you watch the first season, you can see him mouthing along to some of the other characters' lines.

Source: Ask Men