Graduates may still be nursing their hangovers after too many parties, but these CEOs have some important real-life advice for them.

Tim Cook, CEO of Apple Inc. (AAPL - Get Report) , and Dan Schulman, CEO of Paypal Holdings Inc. (PYPL - Get Report) , gave commencement speeches on May 13. Cook spoke at Duke's graduation, while Schulman spoke at Rutgers. However, both CEO's gave some sound advice—not only about life, but also about company values in America during a time that's considered by many to be tumultuous. 

Cook referenced the recent Cambridge Analytica data scandal, "We [Apple] reject the excuse that getting the most out of technology means trading away your right to privacy."

He also threw shade at the Trump administration, "We reject the notion that global warming is inevitable. That's why we run Apple on 100% renewable energy."

Cook focused on the way that graduates will be affecting the workforce and gave advice to help them find their own paths.

"You are uniquely qualified, and therefore uniquely responsible, to build a better way forward. That won't be easy. It will require great courage. But that courage will not only help you live your life to the fullest—it will empower you to transform the lives of others."

Schulman's speech was heavily anecdotal. He discussed how he went from being rejected by the very college he was speaking at to being a CEO of a major tech company.

Schulman also discussed tough choices that he's had to make as CEO, including the time that Paypal pulled out of North Carolina after the passage of HB2, a law that prevents transgender people from using government-run bathrooms corresponding to the gender with which they identify.

"Discrimination of any kind, hurts all of us—and is a threat to our very democracy. So, when we saw this law being passed; we withdrew our expansion plans and walked away from North Carolina. It was a decision that carried consequences. It obviously impacted our ability to expand, and our bottom line. We faced backlash from those who had a different perspective on the bill. And for the first time in my life, I received multiple death threats.

"First of all, don't underestimate your power to make a difference. Every one of you can repair the world. Don't sell yourself short, and don't sell the world short. We need you," stated Schulman, emphasizing the importance of individuality.

"And finally, be relentlessly optimistic. Life has a way of throwing a lot of curve balls at you. You will be knocked down many times. And it will be painful. But you must get up, and having a little attitude helps."

Paypal was down 1.5% to $77.60 and Apple was down nearly 1.3% at $185.78 on Tuesday.

Both Apple and Paypal are holdings in Jim Cramer's Action Alerts PLUS. Want to be alerted before Cramer buys or sells AAPL or PYPL? Learn more now.