我正在学习一门scala课程,在一项作业中,我想添加到自定义列表的末尾。def tail: EntityList}
def head = throw new java.util.NoSuchElementException("head of EmptyList")
def tail = throw new java.util.NoSuchElementException("
据我所知,有时subjectIterator.next()会在列表中没有元素时执行。只有在被访问时才会发生这种情况。方法同步能解决这个问题吗?堆栈跟踪为:at java.util.ArrayList$Itr.next(Unknown Source)
at org.cmos.student.subject.category.CategoryManager.addSubjectsToCategory(Catego