Expand|Select|Wrap|Line Numbers
- double[] dystanse = null;
- Integer[] czyNajblizszySasiad = null;
- Integer[] najblizszySasiad=null;
- System.out.println("Przed 1 petla for");
- for(int j=0;j<=10;j++){
- System.out.println("W 1 petli for");
- if(j!=aktualnyWiersz){
- System.out.println("Przed 2 petla for");
- for(int i=0;i<cols-1;i++){
- System.out.println(i+". W 2 petli for Dokladamy dystans do tablicy");
- czyNajblizszySasiad[i]=klasyfikatorNN.dane_treningowe[j][i];
- System.out.println("klasyfikatorNN.dane_treningowe[j][i]"+klasyfikatorNN.dane_treningowe[j][i]);
- dystanse[j]=klasyfikatorNN.liczDystans(czyNajblizszySasiad);
- }
- }else{
- System.out.println("j rowne aktualnemu wierszowi");
- dystanse[j]=0;
- }
- }
seems like it doesnt go through the 1st for loop goes only once and throws exception
Exception in thread "AWT-EventQueue-0" java.lang.NullP ointerException
at Test$2.actionPe rformed(Test.ja va)
at javax.swing.Abs tractButton.fir eActionPerforme d(Unknown Source)
at javax.swing.Abs tractButton$Han dler.actionPerf ormed(Unknown Source)
at javax.swing.Def aultButtonModel .fireActionPerf ormed(Unknown Source)
at javax.swing.Def aultButtonModel .setPressed(Unk nown Source)
at javax.swing.pla f.basic.BasicBu ttonListener.mo useReleased(Unk nown Source)
at java.awt.Compon ent.processMous eEvent(Unknown Source)
at javax.swing.JCo mponent.process MouseEvent(Unkn own Source)Przed 1 petla for
W 1 petli for
j rowne aktualnemu wierszowi
at java.awt.Compon ent.processEven t(Unknown Source)
at java.awt.Contai ner.processEven t(Unknown Source)
at java.awt.Compon ent.dispatchEve ntImpl(Unknown Source)
at java.awt.Contai ner.dispatchEve ntImpl(Unknown Source)
at java.awt.Compon ent.dispatchEve nt(Unknown Source)
at java.awt.Lightw eightDispatcher .retargetMouseE vent(Unknown Source)
at java.awt.Lightw eightDispatcher .processMouseEv ent(Unknown Source)
at java.awt.Lightw eightDispatcher .dispatchEvent( Unknown Source)
at java.awt.Contai ner.dispatchEve ntImpl(Unknown Source)
at java.awt.Window .dispatchEventI mpl(Unknown Source)
at java.awt.Compon ent.dispatchEve nt(Unknown Source)
at java.awt.EventQ ueue.dispatchEv ent(Unknown Source)
at java.awt.EventD ispatchThread.p umpOneEventForF ilters(Unknown Source)
at java.awt.EventD ispatchThread.p umpEventsForFil ter(Unknown Source)
at java.awt.EventD ispatchThread.p umpEventsForHie rarchy(Unknown Source)
at java.awt.EventD ispatchThread.p umpEvents(Unkno wn Source)
at java.awt.EventD ispatchThread.p umpEvents(Unkno wn Source)
at java.awt.EventD ispatchThread.r un(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullP ointerException
at Test$2.actionPe rformed(Test.ja va)
at javax.swing.Abs tractButton.fir eActionPerforme d(Unknown Source)
at javax.swing.Abs tractButton$Han dler.actionPerf ormed(Unknown Source)
at javax.swing.Def aultButtonModel .fireActionPerf ormed(Unknown Source)
at javax.swing.Def aultButtonModel .setPressed(Unk nown Source)
at javax.swing.pla f.basic.BasicBu ttonListener.mo useReleased(Unk nown Source)
at java.awt.Compon ent.processMous eEvent(Unknown Source)
at javax.swing.JCo mponent.process MouseEvent(Unkn own Source)
at java.awt.Compon ent.processEven t(Unknown Source)
at java.awt.Contai ner.processEven t(Unknown Source)
at java.awt.Compon ent.dispatchEve ntImpl(Unknown Source)
at java.awt.Contai ner.dispatchEve ntImpl(Unknown Source)
at java.awt.Compon ent.dispatchEve nt(Unknown Source)
at java.awt.Lightw eightDispatcher .retargetMouseE vent(Unknown Source)
at java.awt.Lightw eightDispatcher .processMouseEv ent(Unknown Source)
at java.awt.Lightw eightDispatcher .dispatchEvent( Unknown Source)
at java.awt.Contai ner.dispatchEve ntImpl(Unknown Source)
at java.awt.Window .dispatchEventI mpl(Unknown Source)
at java.awt.Compon ent.dispatchEve nt(Unknown Source)
at java.awt.EventQ ueue.dispatchEv ent(Unknown Source)
at java.awt.EventD ispatchThread.p umpOneEventForF ilters(Unknown Source)
at java.awt.EventD ispatchThread.p umpEventsForFil ter(Unknown Source)
at java.awt.EventD ispatchThread.p umpEventsForHie rarchy(Unknown Source)
at java.awt.EventD ispatchThread.p umpEvents(Unkno wn Source)
at java.awt.EventD ispatchThread.p umpEvents(Unkno wn Source)
at java.awt.EventD ispatchThread.r un(Unknown Source)
Przed 1 petla for
W 1 petli for
j rowne aktualnemu wierszowi
thank YOU