 -- Stars have had plenty to say to this year's crop of college graduates.

Robert De Niro, Oprah Winfrey, Will Ferrell and Sheryl Sandberg were among the marquee names who have doled out advice during commencement speeches this year.

Speaking at Brown University Sunday, De Niro put the current state of affairs in the U.S. into movie terms and told current graduates it was up to them to make the world a better place.

"When you started school, the country was an inspiring, uplifting drama," the Oscar winner, 73, said. "You are graduating into a tragic, dumb--- comedy. My advice is to lock the Van Wickle Gates and stay here. But if you do leave, work for the change. Work to stop the insanity. Start now, so the class of 2018 will graduate into a better world."

Check out the advice other celebrities gave at commencements earlier this month.

Oprah Winfrey: Live a life of substance

"I've made a living, I've made a life, I've made a fortune, really — all good! — from being true to myself," Oprah Winfrey told the crowd at Agnes Scott College in Decatur, Georgia. "If I can leave you with any message today: The biggest reward is not financial benefits, though it's really good — you can get a lot of great shoes."

"Those of you who have a lot of shoes know having a closet full of shoes doesn't fill up your life," she continued. "Living a life of substance can. Substance through your service."

Janelle Monae: Choose freedom over fear

Singer and actress Janelle Monae gave Dillard University graduates in New Orleans her three secrets to life.

"No. 1, the importance of being gracious. No. 2, the importance of being proud. No. 3, the importance of choosing freedom over fear," she said.

"And so on this day, graduates of 2017, the future, I celebrate you as you remember the power of grace and pride," she concluded. "And I challenge you to choose freedom over fear."

Sheryl Sandberg: Build resilience

"We don't have a set amount of resilience. It's a muscle that any of us can build," Facebook COO Sheryl Sandberg told Virginia Tech graduates. "We build resilience in ourselves. We build it in the people we love. And we build it together, as a community. That's called collective resilience, and it's an incredibly powerful force, one that our country and world need so badly right now."

Will Ferrell: Don't be afraid of failure

"SNL" alum Will Ferrell talked to University of Southern California graduates about experiencing failure in his early years when he was sitting alone in his apartment "eating spaghetti topped with mustard."

"Yes, I was afraid. You're never not afraid. I'm still afraid," he said. But, he added, "my fear of failure never approached in magnitude my fear of 'What if? What if I never tried at all?'"

"No matter how cliche it may sound, you will never truly be successful until you learn to get beyond yourself," he told the class of 2017, concluding with a rendition of "I Will Always Love You."

Pharrell Williams: Don't be invisible

Grammy winner Pharrell Williams encouraged New York University graduates to get involved with causes close to them.

"Engage and inspire, whether on an individual level or loudly within your communities," he said. "Talk about your accomplishments. Be humble but not too humble. Don't be invisible."

"The days of being an anonymous activist or participant are over," he added. "How can we inspire if we are only behind the scenes?"

Octavia Spencer: More change is coming

"Comparing yourself to others' success only slows you down from finding your own," Oscar winner Octavia Spencer told the graduating class at Kent State University in Ohio. "If I had to read '25 actresses who broke through before 25' when I was first starting out, I tell you guys, I would have stayed in bed. Because I guarantee you that none of them looked like me. None of them. So know this: As much as you've changed during your time here, more change is coming."

Helen Mirren: Make each opportunity count

Helen Mirren reassured Tulane graduates in New Orleans that life has a way of working out.

"The trick is to listen to your instinct, grab the opportunity when it presents itself and then give it your all," the Oscar winner said. "You will stumble and fall. You will experience both disaster and triumph, sometimes in the same day. But it's really important to remember that, like a hangover, neither triumphs nor disasters last forever. They both pass, and a new day arrives. Just try to make that new day count."

]/>