Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

>> REGISTER NOW TO START POSTING

1. ## A Part Question

Hi,

I have a Homework that say build 2D array with 4 rows and different columns
like this E.g
1 2 3
1 2 3 4
1 2
1 2 3 4 5

then sum of each row and columns

i have made the program , the sum of rows works good , but in columns i am facing a problem which is the length .
So my question is How to Defeat this problem

and thanks.

2. ## Re: A Part Question

Hint: A 2D array is just an array of arrays.

3. ## The Following User Says Thank You to KevinWorkman For This Useful Post:

Aksand (April 12th, 2011)

4. ## Re: A Part Question

Ooooops , i Have forget something...
it is not normal sum, the question asks by using loop.....

Thanks KevinWorkman.
I am still Beginner in Java...

5. ## Re: A Part Question

Originally Posted by Aksand
Ooooops , i Have forget something...
it is not normal sum, the question asks by using loop.....

Thanks KevinWorkman.
I am still Beginner in Java...
So are you still stuck, or did you figure it out?

6. ## Re: A Part Question

aaaaaaa,nup

i am still having an Error in the sum of each columns , the whole problem is the length of each column while using for loop.

7. ## Re: A Part Question

Originally Posted by KevinWorkman
So are you still stuck, or did you figure it out?
Oooo Thanks A lot KevinWorkman.
It is Works like Charm now , just one if statement solved the problem..
I am missing C days , when I was stay weeks in one problem...

Is there a "Solved" button , so i can consider this as solved???