为了账号安全,请及时绑定邮箱和手机立即绑定

尽管使用synchronized,ConcurrentModificationException

尽管使用synchronized,ConcurrentModificationException

尚方宝剑之说 2019-07-23 15:32:36
尽管使用synchronized,ConcurrentModificationExceptionpublic synchronized X getAnotherX(){    if(iterator.hasNext()){    X b = iterator.next();    String name = b.getInputFileName();   ...    return b;   }   else{return null;}  }尽管声明头中的synchronized语句,我仍然在我使用iterator.next()的行中得到一个ConcurrentModificationException异常; 什么错了?
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 770 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号