Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 17th, 2012  |  syntax: None  |  size: 0.54 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Java set value to multi-dim array --> token error
  2. // Trying to create 2 dimensional array
  3. // Can in Netbeans, but not Eclips Help
  4. // error missing token '{' reported by Eclipse
  5. int[][] xCoord=new int[cols][6];
  6. for (int outLoop=0; outLoop < (xCoord[outLoop].length); outLoop++) {
  7.     for (int inLoop=0; inLoop<xCoord.length; inLoop++)
  8.         xCoord[outLoop][inLoop]=0;
  9.     }    
  10.  
  11. // Works OK but intending to use finished method dynamically.
  12. int[][] xCoordz= {{0,0,0,0,0,0},
  13.                   {0,0,0,0,0,0},
  14.                   {0,0,0,0,0,0} };