More than 500 students at Hofstra University received graduate and undergraduate degrees at midyear commencement ceremonies in Hempstead Sunday.

New York Lt. Gov. Kathleen Hochul, who received an honorary degree from the university before giving the commencement speech, told the graduates to take risks. She gave an example from her own life, when she ran as a Democrat for Congress in a Republican district and won.

“I’m talking about the risk where there’s something you want to do that’s so gutsy that people tell you, ‘You know what, you might not want to do that because you might fail,’ ” Hochul said. She told graduates to put discouraging words aside.

“You’ve got to go big in this world, you have to take risks, you’ve got to do something that you never thought you could do,” she said.

Hofstra president Stuart Rabinowitz told the students, who received degrees in subjects including art history, biology, mathematics, finance and law, that the secret to happiness in life is different for everyone.

“We must discover it and we must discover our own path for fulfillment for ourselves,” Rabinowitz said.

After the ceremony, graduates said they were either looking for jobs or considering continuing their studies.

advertisement | advertise on newsday

Ariel Xie, 25, from Shanghai, China, completed a graduate degree in marketing analysis and wants to work for an international company in the United States.

“Digitalization is the future of marketing,” she said. “Every company is going to Twitter and Facebook.”

Having finished his undergraduate degree in mathematics, Patrick Diaz, 25, who came from Richmond Hill, Queens, said he plans to move to San Francisco, where he’s applied for jobs with tech startup companies.

“There’s a lot of opportunities for math majors,” Diaz said, adding that he’s looking for a job as an analyst. “There’s more data than people.”

Christine Barbaccia, 27, of Dix Hills, said she is weighing offers with intensive care units. She had worked as an emergency medical technician before coming to Hofstra, where she just finished a master’s degree in physician assistant studies.

@Newsday

“I’ve just always been attracted to helping people in their greatest time of need,” she said. At Hofstra, “they taught us to really be compassionate and listen to our patients and what they really need,” she said.

Abdul Moiz Qadri, 23, of Stamford, Connecticut, said he plans to get a second master’s degree now that he’s finished one in public health. Qadri said he’s applying for physician assistant programs.

“It brings a sense of accomplishment to me for someone else to be healthy and happy because of something I did,” Qadri said.