"I honestly don't think they understand what socialism is," Dimo n told CNBC during a " Squawk Box " interview at the World Economic Forum in Davos, Switzerland, referring to a question about millennials.

With democratic socialist Sen. Bernie Sanders among the leaders in the Democratic presidential race and other candidates espousing similar-sounding ideas, the head of the nation's biggest bank by assets said the idea of socialist control of the means of production would be detrimental to the U.S.

Socialism has failed where it's been tried and ultimately leads to an "eroding society," J.P. Morgan Chase CEO Jamie Dimon said Wednesday.

"Most state-owned enterprises don't do a particularly good job," he added. "You look around the world and they become corrupt over time. That doesn't mean that capitalism is perfect. That doesn't mean that every public company is perfect. No, there are flaws."

Sanders has been the most out front of the candidates in backing socialism, though many of his opponents in the Democratic race also back universal health care, increased business taxes and greater government control over private enterprise.

Dimon said he did not want to address any specific candidates. But he said that socialist governments traditionally have done a poor job allocating capital and end up backing politically popular endeavors and "bridge to nowhere" projects.

"Once you do that, you will have an eroding society," he said.

"They do need to fix inner-city schools, infrastructure, health care," Dimon added. "We can fix all of those in a capitalist society."