Hi,
I'm new to java, but will this give you what you want?
class hello
{
public static void main(String[] args)
{
int x;
String[][] tstl = new String[5][10];
System.out.println(tstl.length + " "// gets no of rows
for(x = 0; x < tstl.length; ++x)
System.out.println(tstl[x].length + " " gets size of each row which can be sumed
}
}
I say "rows" because it's easier to think in rows and columns.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.