Help with array of int[][]
From: Miss Michelle. Heigardt (michelleheigardt_at_hotmail.com)
Date: 03/27/05
- Next message: McKirahan: "Re: How to populate HTML table from local text file."
- Previous message: Alan Little: "Re: How to populate HTML table from local text file."
- Next in thread: Neil Campbell: "Re: Help with array of int[][]"
- Reply: Neil Campbell: "Re: Help with array of int[][]"
- Reply: Patricia Shanahan: "Re: Help with array of int[][]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Mar 2005 06:49:04 -0800
Hallo
If I have a int matrix like this
int m=new int[5][8];
and I have a method
protected void methodName(int[][] matrix,int noRows)
{
System.out.println("No rows="+String.valueOf(noRows));
int noCols=matrix.length/noRows;
System.out.println("No cols="+String.valueOf(noCols));
}
and I call it like
methodName(m,5);
Why is the noCols printed wrong?
Thank you
Michelle
- Next message: McKirahan: "Re: How to populate HTML table from local text file."
- Previous message: Alan Little: "Re: How to populate HTML table from local text file."
- Next in thread: Neil Campbell: "Re: Help with array of int[][]"
- Reply: Neil Campbell: "Re: Help with array of int[][]"
- Reply: Patricia Shanahan: "Re: Help with array of int[][]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]