Prince William surprised students at a British high school and gave an update on Kate Middleton.

The Prince of Wales made a surprise appearance at St Michael's Church of England High School Thursday, after he received a letter from one of its students, Freddie Hadley, in October.

"Lots of people write letters, but Freddie's was a really well-written letter. I promised I would come," he told a staff member at the school during his visit, according to the Daily Mail. "I am sorry Catherine can't be here as well. She would have loved to."

His visit to the school comes just one month after Middleton shared in a video revealing she was diagnosed with cancer.

Prince William visiting a British school and Kate Middleton split

Prince William says Middleton would have loved to visit the school with him. (Getty Images)

PRINCE WILLIAM RETURNS TO ROYAL DUTY NEARLY 1 MONTH AFTER KATE MIDDLETON'S CANCER DIAGNOSIS ANNOUNCEMENT

The royal couple first learned about Freddie and his classmates when he wrote them a letter inviting them to an event his school was hosting for World Mental Health Day. While he was unable to attend, William shared his apologies on X, formerly Twitter, to Freddie, encouraging him to "please keep up this important work" as "tackling mental health challenges and stigmas head-on is so important."

CLICK HERE TO VIEW INSTAGRAM POST

During his surprise visit, William not only spoke about how mental health challenges have affected him in his personal life. He also gave audiences a look at his softer side when he told a joke.

"I am here with the gang here talking about male mental health, and I've been asked to produce a dad joke. I was trying to channel Jack Whitehall because most of his jokes are pretty dad-like," he said, according to reports. "I think what I'll do is say a joke that is Charlotte's favorite joke at the moment, that she keeps telling me."

He went on to tell a knock-knock joke. When the students asked "who's there," William responded with "interrupting cow," and before the students could finish asking "interrupting cow who?" William interrupted, saying, "Moo!"

Prince William sitting with students at a high school

Prince William shared his struggle with mental health and told jokes while visiting the school. (Oli Scarff/Pool/AFP via Getty Images)

After getting a few laughs from the crowd, William explained that "was the greatest one" that he was able to think of that was both "clean and broadcastable."

"It's good. It's good," Freddie assured him.

In an effort to surprise Freddie, school officials told him he would be meeting with the Lord Lieutenant of the West Midlands. Instead, it was Prince William who stepped out of the motorcade, with Freddie telling People magazine seeing him was a "massive shock."

LIKE WHAT YOU’RE READING? CLICK HERE FOR MORE ENTERTAINMENT NEWS

"So, this is the young lad who started it all off. Very nice to see you. Thank you for your letter," William said.

"You're very welcome," Freddie responded.

Prince William shaking Freddie's hand

Prince William thanked Freddie for his letter upon meeting him. (Getty Images)

In his letter, Freddie called himself a representative of the Matrix Project, which aims to eliminate the stigma surrounding mental health, specifically in men. The focus is early intervention, focusing energy on boys, ages 11 to 14, who come together to brainstorm how to best work through mental health challenges.

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

"He is a very nice guy," Freddie told People. "When I sat down with him about what we do in school with our Matrix Project, I got more comfortable, and I felt like I got into his way of thinking about it. He asked us about why we do our stuff and why he is an advocate for male mental health.

Prince William sitting next to Freddie while addressing students.

Freddie admitted to being nervous when first meeting Prince William. (Oli Scarff/Pool/AFP via Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

"[William] said from working with charities for mental health he realizes — as he’s a male himself — he’s gone through those things before," he added. "He realizes it is such a massive thing in today’s society, and he wanted to step up and get these issues sorted out."