arrays - Java: ArrayOutOfBoundsException -



arrays - Java: ArrayOutOfBoundsException -

i have error when seek do

data[i][1]=tmp[1];

or int > 0 in tmp[]. donne contains 5 parts separated :__:. if system.out.println(tmp[1]); print right thing , throw exception. here code:

string[] donne=toserv.getdonneaccueil(); system.out.println(donne[0]); // données test object[][] info = new object[donne.length][6]; for(int i=0;i<donne.length;i++){ final int k; string[] tmp=donne[i].split(":__:"); /*system.out.println(tmp[0]); system.out.println(tmp[1]); system.out.println(tmp[2]); system.out.println(tmp[3]); */ data[i][0]=tmp[0]; data[i][1]=tmp[1]; data[i][2]="n"; data[i][3]=tmp[2]; data[i][4]=tmp[3];

the stack trace is:

exception in thread "awt-eventqueue-0" java.lang.arrayindexoutofboundsexception: 1 @ vue_accueil.<init>(vue_accueil.java:60) @ menu$1.mouseclicked(menu.java:65) @ java.awt.awteventmulticaster.mouseclicked(unknown source) @ java.awt.component.processmouseevent(unknown source) @ javax.swing.jcomponent.processmouseevent(unknown source) @ java.awt.component.processevent(unknown source) @ java.awt.container.processevent(unknown source) @ java.awt.component.dispatcheventimpl(unknown source) @ java.awt.container.dispatcheventimpl(unknown source) @ java.awt.component.dispatchevent(unknown source) @ java.awt.lightweightdispatcher.retargetmouseevent(unknown source) @ java.awt.lightweightdispatcher.processmouseevent(unknown source) @ java.awt.lightweightdispatcher.dispatchevent(unknown source) @ java.awt.container.dispatcheventimpl(unknown source) @ java.awt.window.dispatcheventimpl(unknown source) @ java.awt.component.dispatchevent(unknown source) @ java.awt.eventqueue.dispatcheventimpl(unknown source) @ java.awt.eventqueue.access$400(unknown source) @ java.awt.eventqueue$3.run(unknown source) @ java.awt.eventqueue$3.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ java.security.protectiondomain$1.dointersectionprivilege(unknown source) @ java.security.protectiondomain$1.dointersectionprivilege(unknown source) @ java.awt.eventqueue$4.run(unknown source) @ java.awt.eventqueue$4.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ java.security.protectiondomain$1.dointersectionprivilege(unknown source) @ java.awt.eventqueue.dispatchevent(unknown source) @ java.awt.eventdispatchthread.pumponeeventforfilters(unknown source) @ java.awt.eventdispatchthread.pumpeventsforfilter(unknown source) @ java.awt.eventdispatchthread.pumpeventsforhierarchy(unknown source) @ java.awt.eventdispatchthread.pumpevents(unknown source) @ java.awt.eventdispatchthread.pumpevents(unknown source) @ java.awt.eventdispatchthread.run(unknown source)

java arrays

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -