943,973 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 2997
  • Java RSS
Nov 27th, 2004
0

How to print out the position of 2 dimension arrays?

Expand Post »
there are 2 dimension arrays, how can print out the position of value than 4?

for example

0 2 3 2 2 2
0 1 1 2 5 3
1 2 3 3 2 1

print out:
The pos is ( 4,1).
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bright2000 is offline Offline
1 posts
since Nov 2004
Nov 28th, 2004
0

Re: How to print out the position of 2 dimension arrays?

You could construct two for loops which search through the array - one inside the other. Then when you find which value you are looking at - just print out the number each bit of the for loop got to.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
MrScruff is offline Offline
89 posts
since Nov 2004
Nov 29th, 2004
0

Re: How to print out the position of 2 dimension arrays?

didn't you post this on javaboutique as well? i posted an answer on there.
Reputation Points: 92
Solved Threads: 51
Practically a Posting Shark
Phaelax is offline Offline
856 posts
since Mar 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Panel Layouts
Next Thread in Java Forum Timeline: Comenzando con Java





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC