The paradox is because the prisoner does indeed disprove the statement "I will be hanged, and it will be a surprise no matter which day it happens", but the statement turns out to be true (he is both hanged, and surprised no matter what day he's hanged).