In the last five years, dozens of schools have popped up offering an unusual promise: Even humanities graduates can learn how to code in a few months and join the high-paying digital economy. Students and their hopeful parents shelled out as much as $26,000 seeking to jump-start a career.

But the coding boot-camp field now faces a sobering moment, as two large schools have announced plans to shut down this year — despite backing by major for-profit education companies, Kaplan and the Apollo Education Group, the parent of the University of Phoenix.

The closings are a sign that years of heady growth led to a boot-camp glut, and that the field could be in the early stages of a shakeout.

“You can imagine this becoming a big industry, but not for 90 companies,” said Michael Horn, a principal consultant at Entangled Solutions, an education research and consulting firm.