This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Read a 2d array into a method? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Read a 2d array into a method?" Watch "Read a 2d array into a method?" New topic
Author

Read a 2d array into a method?

Travis Gn
Greenhorn

Joined: Sep 11, 2003
Posts: 19
I am trying to check for Reflexive, Symmertric, and Antisymmetric of a double array. i.e.
1 0 1
0 1 0
1 0 1
I created the the above array and tried to read it into a method:

I know I am missing something easy.
Thanks for the help!


I need more help!
Jeff Bosch
Ranch Hand

Joined: Jul 30, 2003
Posts: 804

Try changing your method signature to reflect the array size:

Hope that helps.


Give a man a fish, he'll eat for one day. <br />Teach a man to fish, he'll drink all your beer.<br /> <br />Cheers,<br /> <br />Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
Travis Gn
Greenhorn

Joined: Sep 11, 2003
Posts: 19
I tried that, didn't work.
am I calling it right?
Rocky Summers
Ranch Hand

Joined: Nov 07, 2003
Posts: 66
i think to accept a 2D array, you should go like this:
chi Lin
Ranch Hand

Joined: Aug 24, 2001
Posts: 348
if you define array like

you should just use reflexive(array);
[ November 25, 2003: Message edited by: chi Lin ]

not so smart guy still curious to learn new stuff every now and then
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Read a 2d array into a method?
 
Similar Threads
array issues
Garbase Collection Help
array access
Trying to print first 100 prime numbers using an array
Question on multi dimensional array