PISCATAWAY, New Jersey -- President Barack Obama on Sunday urged college graduates to shun those who want to confront a rapidly linked world by building walls around the United States or by embracing ignorance, as he delivered a sharp and barely concealed critique of Donald Trump.Obama used his commencement speech at Rutgers University to illustrate a world view antithetical to the ideas espoused by the presumptive Republican presidential nominee. Looking out at a sea of red and black gowns, Obama told the roughly 12,000 graduating students that the pace of change on the planet is accelerating, not subsiding, and that recent history had proved that the toughest challenges cannot be solved in isolation."A wall won't stop that," Obama said, bringing to mind Trump's call for building a border wall between the U.S. and Mexico. "The point is, to help ourselves, we've got to help others - not pull up the drawbridge and try to keep the world out."The president never mentioned Trump by name, but his intended target seemed clear. Repeatedly, Obama referred to disparaging comments about Muslims and immigrants, and opposition to free trade deals. But he appeared most incensed by what he described as a rejection of facts, science and intellectualism that he said was pervading politics."In politics and in life, ignorance is not a virtue," Obama said. "It's not cool to not know what you're talking about. That's not keeping it real or telling it like it is. That's not challenging political correctness. That's just not knowing what you're talking about," the president said."And yet, we've become confused about this," he continued, warning that the rejection of facts and science would lead the U.S. on a path of decline.Some 50,000 students and their families packed High Point Solution Stadium for the ceremony, the first at Rutgers to involve a sitting president. The public university's leaders lobbied the president for years to come to campus for the school's 250th anniversary, and Obama praised the school for its diverse student body and research programs.Sunday's address was the second of three commencement speeches that Obama will deliver during his final graduation season as president. Earlier in May, Obama told graduates at historically black Howard University that the country is "a better place today" than when he graduated from Columbia University more than 30 years ago. The president will also speak on June 2 at the U.S. Air Force Academy in Colorado Springs, Colorado.The university also bestowed an honorary law degree on the president, add to the half-dozen or so other honorary degrees that the Columbia and Harvard Law School Obama has received.