Quantcast
Channel: NullPointer – 100% Private Proxies – Fast, Anonymous, Quality, Unlimited USA Private Proxy!
Viewing all articles
Browse latest Browse all 2

Un arreglo de String ya inicializado me marca NullPointer?

$
0
0
public void aleatorios2 (  ) {     direc = new int[ modelo.getRowCount() ];     arre = new String[ 50 ];      System.out.println("Arre → " + arre.length );     for (int r = 0; r < direc.length; r++) {         aucs = a.nextInt(39);         aucs += 5;          System.out.println("aucs → " + aucs);         System.out.println("Arre → " + arre.length );         if ( valorRep(arre, String.valueOf( (char) (proc + 65) ) ) == false ) {              int aucx = Integer.parseInt( modDat.getValueAt( r, 2 ).toString() );             System.out.println("Arre → " + arre.length );             for (int rx = 0; rx < arre.length; rx++) {                 for (int rr = 0; rr < aucx ; rr++) {                     int dir = aucs + rr;                     System.out.println("Arre → " + arre.length );                     if ( arre[ dir ].compareTo("") == 0 ) {                     System.out.println("Arre → " + arre.length );                         bandAux = true;                         break;                     }                 }                 break;             }              if ( bandAux ) {                 direc [ r ] = aucs;                 for (int rr = 0; rr < aucx; rr++) {                     arre [ aucs + rr ] = String.valueOf( (char) (proc + 65) );                 }             } else {                 r--;             }           } else {             r--;         }      }      for (int r = 0; r < modDat.getRowCount(); r++) {         modDat.setValueAt(direc[r], r, 1);     }   } 

Me lo marca dentro de este if

if ( arre[ dir ].compareTo("") == 0 ) {                 System.out.println("Arre → " + arre.length );                     bandAux = true;                     break;                 } 

Mensaje de la salida

The post Un arreglo de String ya inicializado me marca NullPointer? appeared first on 100% Private Proxies - Fast, Anonymous, Quality, Unlimited USA Private Proxy!.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>