Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Multi dimensional array  RSS feed

 
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
 
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,...
 
Marshal
Posts: 61741
193
  • 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}
 
Marshal
Posts: 6257
420
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
Marshal
Posts: 6257
420
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: 61741
193
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!