Multidimensional Arrays lengths in Java

0 votes
How can I determine the lengths of a multidimensional array where the indices are not equal? For example, this is what I have

int[][] pathList = new int[6][4]

I need to locate the numbers "6" and "4" without really hard-coding the indices.

I can find 6 using pathList.length, but how to do the same with 4?
Aug 8 in Java by krishna
• 2,640 points
28 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Java

0 votes
2 answers

How to concatenate two arrays in Java?

public <T> T[] concatenate(T[] a, T[] b) ...READ MORE

answered Jul 19, 2018 in Java by Sushmita
• 6,900 points
2,000 views
+1 vote
1 answer

Are arrays equivalent to objects in Java ?

Yes; the Java Language Specification writes: In the Java ...READ MORE

answered May 10, 2018 in Java by Rishabh
• 3,620 points
519 views
0 votes
1 answer

Arrays are passed by value or passed by reference in Java?

Arrays are not a primitive type in ...READ MORE

answered Jul 18, 2018 in Java by sophia
• 1,400 points
7,018 views
0 votes
0 answers

Returning arrays in Java

I am trying to return an array ...READ MORE

Aug 11 in Java by krishna
• 2,640 points
23 views
0 votes
0 answers

How do I fill arrays in Java?

Is there a proper way to fill ...READ MORE

Aug 12 in Java by krishna
• 2,640 points
32 views
0 votes
0 answers

How are arrays implemented in java?

In Java, arrays are implemented as objects, ...READ MORE

Aug 18 in Java by krishna
• 2,640 points
36 views
0 votes
0 answers

Matrix multiplication using arrays

Utilizing multidimensional arrays, I'm attempting to create ...READ MORE

Aug 5 in Java by krishna
• 2,640 points
38 views
0 votes
2 answers

How an object array can be converted to string array in java?

System.arraycopy is the most efficient way, but ...READ MORE

answered Aug 8, 2018 in Java by Sushmita
• 6,900 points
3,180 views
0 votes
2 answers

How does random shuffling of an array

Here is a simple way using an ArrayList: List<Integer> ...READ MORE

answered Nov 2, 2018 in Java by Sushmita
• 6,900 points
268 views
0 votes
1 answer

How to check if array is multidimensional or not?

Since the 'second dimension' could be just ...READ MORE

answered Nov 5, 2018 in Others by DataKing99
• 8,240 points
4,053 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP