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.

Page 2 of 2 FirstFirst 12
Results 26 to 29 of 29

Thread: Help for my codes

  1. #26
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Help for my codes

    Why are there nested loops? The loop only needs to look at one column in each row. The one where the student id is located.
    The other columns in the row contain other data about the student.

    I suggest that the search loop be rewritten to use a single loop.
    If you don't understand my answer, don't ignore it, ask a question.

  2. The Following User Says Thank You to Norm For This Useful Post:

    noobie (March 21st, 2013)

  3. #27
    Junior Member
    Join Date
    Mar 2013
    Posts
    16
    My Mood
    Confused
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Default Re: Help for my codes

    Quote Originally Posted by Norm View Post
    Why are there nested loops? The loop only needs to look at one column in each row. The one where the student id is located.
    The other columns in the row contain other data about the student.

    I suggest that the search loop be rewritten to use a single loop.
    can you code it sir?

  4. #28
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Help for my codes

    Try writing a single loop that looks at the one column in each row that contains the student id value.
    If you don't understand my answer, don't ignore it, ask a question.

  5. The Following User Says Thank You to Norm For This Useful Post:

    noobie (March 21st, 2013)

  6. #29
    Member Chris.Brown.SPE's Avatar
    Join Date
    May 2008
    Location
    Fort Wayne, Indiana
    Posts
    190
    Thanks
    1
    Thanked 31 Times in 31 Posts

    Default Re: Help for my codes

    Quote Originally Posted by noobie View Post
    can you code it sir?
    NO!

    Norm is right, your loop only needs to look at the first column, unless you want to be able to input something like "meow1" and get that whole row which to be honest is funtionality i like in table filters.

    As for getting all of the information, sounds like all you're missing is to save the row number "i" when you find what you're looking for, then you can access the data in your output. You're practically done!
    Writing code is your job, helping you fix and understand it is mine.

    <-- Be sure to thank and REP (Star icon) those who have helped you. They appreciate it!

  7. The Following User Says Thank You to Chris.Brown.SPE For This Useful Post:

    noobie (March 21st, 2013)

Page 2 of 2 FirstFirst 12

Similar Threads

  1. need help with loops and codes..
    By akocnivek in forum Loops & Control Statements
    Replies: 1
    Last Post: October 19th, 2012, 02:02 AM
  2. Help me please with my codes
    By sara92 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: October 12th, 2012, 11:52 AM
  3. Looking for help on two codes:
    By captianjaax in forum What's Wrong With My Code?
    Replies: 24
    Last Post: September 20th, 2011, 11:49 PM
  4. Please Help What's Wrong with my Codes!
    By bertzki10 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 25th, 2011, 11:03 AM
  5. help us in eclipse basic codes
    By bil_Imma in forum AWT / Java Swing
    Replies: 1
    Last Post: January 24th, 2009, 06:02 PM