• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multi dimensional array  RSS feed

 
narayan lakshmis
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the real world , where can we use Multi dimensional array
 
Stefano Carniel
Greenhorn
Posts: 27
Android Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They can be used to store matrix, for example to represent a maze, or a chessboard, but also in lot of mathematical application, to solve linear sytems,...
 
Campbell Ritchie
Marshal
Posts: 56533
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

There ain't no such thing as a multidimensional array in Java®; what appears to be a multidimensional array is actually an array of arrays.
Think of something which is written out to fill a rectangular grid. If you have anything which fills a grid, then it might be expressed in an array of arrays where one level of nesting represents rows and the other columns.
 
narayan lakshmis
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can i have a numeric value and alphabet value in a multidemnsion array .for example like x[1][1]={1a}
 
Liutauras Vilda
Sheriff
Posts: 4917
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
narayan lakshmis wrote:can i have a numeric value and alphabet value in a multidemnsion array .for example like x[1][1]={1a}

You supposed to take points which have been mentioned already. That's one. Second - no. However, you may have an object inside which may hold what you want.
 
Liutauras Vilda
Sheriff
Posts: 4917
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But if you want to get more precise help, you'd need to help others understand what you are seeking in general. Or at least be more elaborating in your posts.

And welcome to the Ranch
 
Campbell Ritchie
Marshal
Posts: 56533
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is a String. It is usually a bad idea to use Strings if a different type can be created, but you can create a String[][] to hold such data, yes.
 
narayan lakshmis
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!