You're likely thinking of Spike Lee's 1989 film Do the Right Thing. The character Buggin' Out is played by Giancarlo Esposito.
There is no film titled Public Enemy featuring a gangster as a main character.