• Post Reply Bookmark Topic Watch Topic
  • New Topic

array dimension missing  RSS feed

 
Gabrielle Linkherz
Greenhorn
Posts: 26
Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


i got error messages "Arrauy dimension missing" on line : l.add(new Object[]);

Why?
 
Liutauras Vilda
Marshal
Posts: 4670
320
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because you cannot add/create an array of Objects without specifying array size length. i.e. l.add(new Object[4]); or l.add(new Object[]{new Object()});
 
Campbell Ritchie
Marshal
Posts: 55793
164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With all those poorly‑named variables and even two declarations on the same line, it is hardly surprising you are getting confused.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!