Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java SE 综合讨论区 » 实战错误讨论  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Re:求教高手啊(ArrayIndexOutOfBoundsException) [Re:jfs771]
undefined





发贴: 22
积分: 3
于 2005-05-12 20:10 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
要说一句的是,你的程序毛病太多了~~我不好总结具体错在哪里了~

首先最前面的有一个错误: DAFrame类的构造器里,你是如下所写的
this.setlength();
this.Authenticator=authen;
这样是肯定不行的, Attributes 类的对象还没被初始化,你就用this来调用setlength()方法,然后在setlength()方法里又会用到int length1=this.getlength();调用getlength()方法,而在getlength()方法里面return 20 + this.attributes.getlengths();这段代码的attributes属性根本还没有被初始化呢,所以就会在这里就会出先错误的.
然后你在tobyte()方法里的for循环中的循环次数控制在17次,而数组
private byte Authenticator[] = new byte[16];却被定义成16这样肯定会出现
java.lang.ArrayIndexOutOfBoundsException这个错误.
再往后还有错误
再往后就进到Attributes类里了错误依然在for循环里,也是循环次数和数组的索引指针的问题,你自己比对我改过的代码,好好看看自己的错在哪里~




话题树型展开
人气 标题 作者 字数 发贴时间
9196 求教高手啊(ArrayIndexOutOfBoundsException) jfs771 1979 2005-04-19 14:59
7438 Re:求教高手啊。。。。。 bluepure 323 2005-04-19 17:30
7498 Re:求教高手啊。。。。。 jfs771 221 2005-04-19 19:14
7374 Re:求教高手啊(ArrayIndexOutOfBoundsException) xiaoshitou 93 2005-05-11 15:56
7961 Re:求教高手啊(ArrayIndexOutOfBoundsException) undefined 2518 2005-05-12 19:59
9439 Re:求教高手啊(ArrayIndexOutOfBoundsException) undefined 571 2005-05-12 20:10
7978 Re:求教高手啊(ArrayIndexOutOfBoundsException) jfs771 31 2005-05-18 10:37

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923