• Post Reply Bookmark Topic Watch Topic
  • New Topic

Single Dimensional and Multidimensional Arrays  RSS feed

 
Aki Mohan
Ranch Hand
Posts: 99
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey folks!

I am a Java beginner or you could say I'm new to coding, been learning Java from past a few weeks. I'm having real trouble in understand Multidimensional Arrays, probably I'm not able to imagine say 3D array. I find arrays very intimidating, is there any good source that explains things real easy. Also once I finish it I'm thinking of making a Sudoku but I'm just not able to take that one very important step which is taming Arrays. Please help me out. Thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37513
554
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before you think about 3D arrays, do you feel comfortable with 2D arrays? For example, can you write a Tic Tac Toe game?
 
Aki Mohan
Ranch Hand
Posts: 99
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne

Thanks for the reply, well to be honest I wouldn't say I'm quite comfortable with the whole Array topic. And so I'm going to try to make tic tac toe game and will get back here asap once I'm done with it.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37513
554
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll find Tic Tac Toe much simpler than Sukoku. And it has nice subtasks:
1) Create a 2D array initializing each cell to blank.
2) Print out said 2D array
3) Set a cell to X, set a cell to 0, etc
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aki Mohan wrote:Also once I finish it I'm thinking of making a Sudoku but I'm just not able to take that one very important step which is taming Arrays.

Like Jeanne, I'd advise building up to a Sudoku game slowly because it's not simple - even when you do understand how to deal with arrays. I'd think twice about doing it myself, and I've been at this game for quite a while.

For one thing, unless you're planning on solving it with brute force, you need to understand a bit about heuristics, and there are simpler problems around, such as Magic squares, or the n-Queens problem, or the Knight's Tour, which may help you to get into the swing of this kind of puzzle before you try tackling Sudoku.

HIH

Winston
 
Aki Mohan
Ranch Hand
Posts: 99
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys, finally I made the game It took me some time as I did coding in my spare time and also the topic was not easy for me hehe. anyway I feel good now.

Winston, thanks mate I've actually started reading the materials that you provided here in the post, I knew it wasn't going to be easy ;) Anyway I feel nice with 2D and I'm reading about multidimensional. I think I'm grasping it.

Thanks guys,
Aki
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!