Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

array objects

 
brendan holliday
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
int [ ] [ ] scores = { {5,2,4,7}, {9,2}, {3,4} };

They say there are four objects in that line but i can only see three
so where is the fourth one?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64972
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hint: try counting the sets of braces.
 
Ivan Jozsef Balazs
Rancher
Posts: 979
5
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> but i can only see three

Of what type are those three?

Is there maybe an object of another type lurking around?
 
Campbell Ritchie
Sheriff
Pie
Posts: 49411
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic