President Barack Obama speaks after receiving an honorary doctorate of laws during the 250th anniversary commencement ceremony at Rutgers University, May 15, in New Brunswick, New Jersey. Obama is the first sitting president to speak at the school’s commencement. (Eduardo Munoz Alvarez | Getty Images)

Taking a swipe at Donald Trump, President Barack Obama has said the presumptive Republican presidential candidate’s controversial plans to ban Muslims from entering the U.S. and build walls around it would alienate America’s key partners in the fight against extremism, writes Lalit K. Jha. (@Siliconeer, #Siliconeer, #BarackObama, #Trump, #DonaldTrump, #2016USPresidentialRace)

Though he did not name Trump, Obama made it clear what he thinks about the 69-year-old real estate tycoon’s campaign and policy proposals in a highly political commencement speech at the prestigious Rutgers University, May 15.

“The world is more interconnected than ever before, and it’s becoming more connected every day. Building walls won’t change that,” Obama said apparently referring to Trump’s proposals to build a wall at the U.S.-Mexico border.

Obama asked graduates to stand up to those who say that America was better in the past. He also asked them to tout their knowledge and not brag about their ignorance.

“In politics and in life, ignorance is not a virtue,” he told some 12,000 graduates.

“Just as America is better, the world is better than when I graduated…There’s more democracy. We virtually eliminated certain diseases like polio. We’ve cut extreme poverty drastically. We’ve cut infant mortality by an enormous amount,” he said.

“Look, as President, my first responsibility is always the security and prosperity of the United States. And as citizens, we all rightly put our country first. But if the past two decades have taught us anything, it’s that the biggest challenges we face cannot be solved in isolation,” he said amidst applause.

“When overseas states start falling apart, they become breeding grounds for terrorists and ideologies of nihilism and despair that ultimately can reach our shores. When developing countries don’t have functioning health systems, epidemics like Zika or Ebola can spread and threaten Americans, too. And a wall won’t stop that,” Obama said.

He also challenged the notion that Muslims should be banned from the United States, something Trump proposed in December.

“Isolating or disparaging Muslims, suggesting that they should be treated differently when it comes to entering this country, that is not just a betrayal of our values. That’s not just a betrayal of who we are—it would alienate the very communities at home and abroad who are our most important partners in the fight against extremism,” said Obama.

“Suggesting that we can build an endless wall along our borders, and blame our challenges on immigrants—that doesn’t just run counter to our history as the world’s melting pot; it contradicts the evidence that our growth and our innovation and our dynamism has always been spurred by our ability to attract strivers from every corner of the globe,” Obama said.