They were young men, petty officers all, whose lives were lived at sea and then almost certainly lost there.

John Henry Hoagland III grew up in Killeen, Tex., and he spoke about serving his country when he was just 5 and still confronted with kindergarten. His family said he had joined the Junior Reserve Officer Training Corps in high school, and then visited recruiters for different branches of the military before deciding on the Navy, where his uncle and a grandfather had also served.

Aboard big ships plowing waters far from land, he found serenity and exhilaration. Cynthia Kimball, his mother, shared one of her son’s Facebook posts, written in June, that captured his feelings.

“I’ve been to a few gorgeous places since I’ve made it out to the Fleet,” he wrote. “But man,” he added, “I still can’t get over just looking out at the ocean, or staring up at all of the stars at night. I think those two things are at the top of my list of favorite reasons for going Navy over any other branch.”