ANNAPOLIS, Maryland (AP) — President Donald Trump stressed the United States' military might as he addressed graduates at the United States Naval Academy Friday, saying the "best way to prevent war is to be fully prepared for war."

Trump spoke to the 2018 graduating class in Annapolis, stressing American military preparedness a day after he canceled a planned summit with North Korean leader Kim Jong Un.

"Our country has regained the respect that we used to have long ago," said Trump, who did not mention North Korea in his remarks. "Yes, they are respecting us again. America is back."

Trump drew a mixed response as he spoke to 1,042 newly commissioned ensigns and second lieutenants, drawing applause and silence at times as he emphasized his efforts to boost federal defense spending. Said Trump: "we have begun the great rebuilding of the U.S. military."

"We know that the best way to prevent war is to be fully prepared for war and hopefully we never have to use all of this beautiful new powerful new equipment," Trump said.

At the conclusion of his remarks, Trump said that he planned to remain at the graduation to shake each graduate's hand.

Before leaving for the address, Trump said on Twitter said he looks "forward to being with some of the greatest people on earth!"

This marked Trump's first time speaking to the academy's graduating class. Last year, Trump addressed the Coast Guard Academy.