"You combine those things and it means that there is going to be potential anger, frustration, fear. Some of it justified, but just misdirected," Obama said in an interview with NPR released Monday.
"I think somebody like Mr. Trump is taking advantage of that," he continued. "That's what he's exploiting during the course of his campaign."
In a wide-ranging interview before leaving for Hawaii, Obama also discussed the fight against ISIS, and the threat the group poses to the United States.
"This is not an organization that can destroy the United States," Obama said. "But they can hurt us, and they can hurt our people and our families."
“What I would say to my successor is that it is important not just to shoot but to aim,” he said. "It is important ... to make sure that you are making your best judgments based on data, intelligence, the information that's coming for your commanders and folks on the ground, and you're not being swayed by politics."