24% of millennials expect student debt forgiveness

Jonya | Getty Images

College costs continue to rise, but one segment might not be very worried: 24 percent of millennials said they expect their loans will ultimately be forgiven, according to a study released Wednesday by Junior Achievement and PwC US.

That could be a lot of accumulated debt, considering the average amount of cumulative student debt for undergraduates in the class of 2012 was $26,885, according to a recent Pew Research report. The average debt for 2013 graduates is expected to be even higher.

"It's a scary statistic," said Jack Kosakowski, president of Junior Achievement, which co-sponsored the Ypulse survey.

Read MoreActivist group battles student debt crisis

But their millennial optimism might not be too far off base, according to the Consumer Financial Protection Bureau, a watchdog agency set up after the financial crisis.

It estimates that 25 percent of the U.S. workforce is employed by a public service employer and "many may be eligible for existing student loan repayment benefits, including Public Service Loan Forgiveness," according to the CFPB website.

Read MoreStudent loan forgiveness may be coming in the future

In June, President Barack Obama issued an executive action to expand eligibility years for the student loan forgiveness program, which eliminates a portion of the debt for graduates who work full-time in qualifying public sector or nonprofit jobs.

In addition, the borrower must have a direct loan and an income-driven repayment plan, according to the Department of Education. If all those boxes have been ticked, the borrower should be eligible for forgiveness once they've made 120 monthly payments, making them basically free and clear of their federal loans after a decade.

How to avoid student loan default

The survey conducted for Junior Achievement, "Millennials & College Planning," did not address why the students thought their loans would be forgiven, and it was the first year the question was included in the survey.

The report also found that 60 percent of millennials surveyed said financial aid is a deciding factor in their school choice and 21 percent said the cost of college was their family's main financial problem.

The survey of 1,000 people in the 14-to-30 year-old age bracket was conducted in May.

Read MoreTop credit cards for college students