No, it would not have been a surprise if he were hanged on Friday. The prisoner disproves the existence of a strategy for the judge that guarantees surprise, but does not disprove the existence of a strategy that gives the possibility of surprise.
> he assumes what the judge said is true
The judge says he will be hanged. Your comments are inconsistent.