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


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: A Part Question

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default 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. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: A Part Question

    Hint: A 2D array is just an array of arrays.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

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

    Aksand (April 12th, 2011)

  4. #3
    Junior Member
    Join Date
    Apr 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default 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. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: A Part Question

    Quote Originally Posted by Aksand View Post
    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?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  6. #5
    Junior Member
    Join Date
    Apr 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default 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. #6
    Junior Member
    Join Date
    Apr 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: A Part Question

    Quote Originally Posted by KevinWorkman View Post
    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???

Similar Threads

  1. [SOLVED] Help Again Last Part of my Problem :(
    By metalx66 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 19th, 2011, 09:48 PM
  2. Trying to clean this part of my progam up, but cant seem to get it.
    By Mob31 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: February 25th, 2011, 04:49 PM
  3. can' stop working a part of code.plzz help
    By kyros in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 30th, 2010, 03:10 PM
  4. Paint only part of screen
    By bonus_clip in forum AWT / Java Swing
    Replies: 7
    Last Post: October 16th, 2010, 07:21 PM
  5. How to write to specific part of an html file using java
    By nasi in forum File I/O & Other I/O Streams
    Replies: 12
    Last Post: May 27th, 2010, 11:22 PM