Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in Arrays

 
rasu rg
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How the allocation will be done in multi dimensional arrays like 4 dimensional arrays, 3 dimensional arrays, how four dimensional arrays will be related to objects or array in two/three dimensional arrays. Where can i get the detail information about array allocations.

Iam scoring 50%-80% in mock tests, but how will be the questions in real scjp exam, will the questions similar to the ones which we are doing in mock tests.
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remember that you are declaring arrays of arrays, so something like int[m][n] will allocate m spaces in an array. Each of these spaces will be references to arrays with n elements.
 
Naseem Khan
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Here is how the allocation happens for a two dimensional array.




Naseem
[ July 03, 2006: Message edited by: Naseem Khan ]
 
wise owen
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arrays
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic