Updated

A Navy veteran who served during World War II and survived the attack on Pearl Harbor was recognized for his service Wednesday with an honorary college degree.

William Henry Harvey, 95, was assigned to the U.S.S. Sacramento, a PG-19 gunboat, but due to segregation in the service at the time he never served in a combat role and was assigned to be a cook.

“Nobody wanted the black man in the Navy," Harvey told FOX59.

While he wasn't in a direct combat role, the Sacramento was at Pearl Harbor during the attack by Japan on Dec. 7, 1941.

"You learned how to kill and how to use the ammunition properly," Harvey said. "You learned everything as a cook to do the job that is necessary to destroy the enemy.”

Indiana Veteran 1

William Henry Harvey was given an honorary college degree as a thank you for his time in the military during World War II. (FOX59)

Harvey's stories of his military service reached officials at Ivy Tech Community College after a history professor visited the healthcare facility where 95-year-old lives last year on Veterans Day.

NFL PLAYER GIFTS SUPER BOWL LII TICKETS TO 108-YEAR-OLD WWII VETERAN

They later decided to present the Navy veteran with an honorary degree for College and Community Service during their Black History Month celebration, themed "Blacks in the Time of War."

Indiana Veteran 2

The honorary college degree given to William Henry Harvey as a thank you for his time in the military during World War II. (FOX59)

“The original plan was to just present Mr. Harvey with just a small as a token of our appreciation to his service to our country but the leadership at Ivy Tech decided it would be better to give an honorary degree to a man who had given so much to his country,” professor Anthony Conley told FOX59.

In addition to the honorary degree, the 95-year-old was also given a Navy challenge coin for his service. He said he was looking forward to talking to his son about his new degree.