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 24 of 24

Thread: looping and arrays

  1. #1
    Junior Member
    Join Date
    Nov 2010
    Posts
    25
    My Mood
    Confused
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default looping and arrays

    I am trying to write a method for a club that holds information on the members. The method is when a month is entered it will tell you how many members joined in that month. My code is like this:

    import java.util.ArrayList;
    /**
     * Store details of club memberships.
     * 
     * @author (your name) 
     * @version (a version number or a date)
     */
    public class Club
    {
        // Define any necessary fields here ...
     
        private ArrayList<Membership> members;
        /**
         * Constructor for objects of class Club
         */
        public Club()
        {
            // Initialise any fields here ...
            members = new ArrayList<Membership>();
        }
     
        /**
         * Add a new member to the club's list of members.
         * @param member The member object to be added.
         */
        public void join(Membership member)
        {
            members.add(member);
        }
     
        /**
         * @return The number of members (Membership objects) in
         *         the club.
         */
        public int numberOfMembers()
        {
            return members.size();
        }
        /** Determine the number of members who
        *  joined in a given month
        *  @param month The month we are interested in
        *  @return The number of members joining in month.
        */
             public int joinedInMonth(int month) {
                 if(month < 1 || month > 12) {
                    System.out.println("error");
                    return 0;
                }
                else{
     
                    }
                }
    }
    }

    This class is linked to a membership class

    I just don't know how I can make it count the number of members that have joined in the certain month
    I know that I will need a loop but I don't know how I would do it
    Last edited by helloworld922; January 6th, 2011 at 03:58 PM. Reason: making the code part stand out


  2. #2
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: looping and arrays

    Well...if you created twelve ArrayLists, one for each month, you could simply go to that ArrayList and

    membersJoinedThisMonth = thatArrayList.size();

  3. #3
    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: looping and arrays

    Quote Originally Posted by javapenguin View Post
    Well...if you created twelve ArrayLists, one for each month, you could simply go to that ArrayList and

    membersJoinedThisMonth = thatArrayList.size();
    OP- Please don't do this. That's pretty horrible advice. If you did go that route (don't), at least use a map of months to members joined, but again- don't go that route.

    Your original idea of looping through the members was correct and is probably the point of the assignment.

    Loop through them, checking which month each joined. If it matches the input month, increment a variable.
    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!

  4. #4
    Junior Member
    Join Date
    Nov 2010
    Posts
    25
    My Mood
    Confused
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: looping and arrays

    I only have the one arraylist which would have all the members that have joined

    I want a part of the code that checks each member on the list to see if they joined in that certain month and add a number everytime there is a member joined in that month

    @KevinWorkman

    I am not sure how I would write the loop because I am not sure what should be inside the bracket next to the 'for'

  5. #5
    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: looping and arrays

    Quote Originally Posted by Trunk Monkeey View Post
    I am not sure how I would write the loop because I am not sure what should be inside the bracket next to the 'for'
    What have you tried?

    Do you know how to write a for loop? Do you know how to get the number of elements in an ArrayList? Do you know how to access an Object at a particular index of an ArrayList? Alternatively, do you know how to use an iterator? Do you know how to use the "enhanced for" feature?

    If the answer to any of these is "no", then that's where you should start googling.

    Let us know what you find, and feel free to post an SSCCE demonstrating if you get stuck again.
    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. #6
    Junior Member
    Join Date
    Nov 2010
    Posts
    25
    My Mood
    Confused
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: looping and arrays

    I know about while loops and I know abit about arraylists

    But I am not sure how I could write it so it would start to loop through the members

    I think I could get the rest but there is nothing I can find that explains how I would write it out

  7. #7
    Member DavidFongs's Avatar
    Join Date
    Oct 2010
    Location
    Minneapolis, MN
    Posts
    107
    Thanks
    1
    Thanked 45 Times in 41 Posts

    Default Re: looping and arrays

    Quote Originally Posted by javapenguin View Post
    Well...if you created twelve ArrayLists, one for each month, you could simply go to that ArrayList and

    membersJoinedThisMonth = thatArrayList.size();
    This is some of the worst advice I have ever read in my life

  8. #8
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Red face Re: looping and arrays

    Quote Originally Posted by DavidFongs View Post
    This is some of the worst advice I have ever read in my life


    Yeah you could, be it'd be best if for your Member class, you had a dateJoined data field in the constructor then.

    However, you'd still have to have 12 variables, one for each month.

    You would set the date the member joined in and have a boolean, either in the Member class, or this one, and check if it matches a certain date and increment a variable.

    public Member(otherStuff otherStuff, int dateJoined)
    {
    setDateJoined(dateJoined);
    }
     
    public void setDateJoined(int dateJoined)
    {
    this.dateJoined = dateJoined;
    }
     
    public int getDateJoined()
    {
    return dateJoined;
    }

     
    public class Club
    {
     
    private int janMembers =0;
    private int febMembers = 0;
    private int marMembers = 0;
    private int aprMembers = 0;
    private int mayMembers = 0;
    private int junMembers = 0;
    private int julMembers = 0;
    private int augMembers = 0;
    private int sepMembers = 0;
    private int octMembers = 0;
    private int novMembers = 0;
    private int decMembers = 0;
     
    public Club()
    {
    memberList = new ArrayList<Member>();
     
    }
     
     
    public void add(Member m)
    {
    memberList.add(m);
    }
     
     
    public int getMembersInMonth(int month)
    {
    for (int i =0; i < memberList.size(); i++)
    {
    if (memberList.get(i).getDateJoined() == 1)
    {
    janMembers++;
    }
    }
    }
    Last edited by javapenguin; January 6th, 2011 at 05:51 PM.

  9. #9
    Junior Member
    Join Date
    Sep 2010
    Location
    Netherlands
    Posts
    10
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: looping and arrays

    Well. This doesn't rlly work but. that is because the If statement isn't right^^.
    The thing is, I'm used to looping through arrays, and not through Arraylists(if its the same then im sorry).

    Here is what i thought of: (might help you)

     
    public int joinedInMonth(int month) {
                 int membercount = 0;
                 if(month < 1 || month > 12) {
                    System.out.println("error");
                    return 0;
                }
                else{
                      for(int i=0; i <= members.size()-1;i++) {
                            for(int y = i+1; y<= members.size()-1;y++) {
                            if(members.get(i).equals(members.get(y))) {
                            membercount =++;
                        System.out.println(membercount);
                            }
                      }
                     }
     
                     }
                         return membercount;
                    }
            }

    Explanaition:
    You use two loops because you use the first one to check the arraylist. and then you check with the second one if the same number excists in there.
    If it's true, it'll add +1 to the int membercount, which it returns in the end.

    Again, If this didn't help at all. im sorry ^^ (:

  10. #10
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Cool Re: looping and arrays

    Quote Originally Posted by Varial View Post
    Well. This doesn't rlly work but. that is because the If statement isn't right^^.
    The thing is, I'm used to looping through arrays, and not through Arraylists(if its the same then im sorry).

    Here is what i thought of: (might help you)

     
    public int joinedInMonth(int month) {
                 int membercount = 0;
                 if(month < 1 || month > 12) {
                    System.out.println("error");
                    return 0;
                }
                else{
                      for(int i=0; i <= members.size()-1;i++) {
                            for(int y = i+1; y<= members.size()-1;y++) {
                            if(members.get(i).equals(members.get(y))) {
                            membercount =++;
                        System.out.println(membercount);
                            }
                      }
                     }
     
                     }
                         return membercount;
                    }
            }

    Explanaition:
    You use two loops because you use the first one to check the arraylist. and then you check with the second one if the same number excists in there.
    If it's true, it'll add +1 to the int membercount, which it returns in the end.

    Again, If this didn't help at all. im sorry ^^ (:
    I wasn't trying to show the whole thing. Anyway, the .equals thing might not be that great of an idea either.

    What members.get(i) is returning is a Member object.

    If Member doesn't have an equals method, it'll probably use Object's.

    What I had started out doing was to start...just start the loop that would increment the number of members that joined in each month. Then another bunch of if statements would come later to get it to return the value for that month.

  11. #11
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: looping and arrays

    Quote Originally Posted by DavidFongs View Post
    This is some of the worst advice I have ever read in my life


    Yeah you could, be it'd be best if for your Member class, you had a dateJoined data field in the constructor then.

    However, you'd still have to have 12 variables, one for each month.

    You would set the date the member joined in and have a boolean, either in the Member class, or this one, and check if it matches a certain date and increment a variable.

    public Member(otherStuff otherStuff, int dateJoined)
    {
    setDateJoined(dateJoined);
    }
     
    public void setDateJoined(int dateJoined)
    {
    this.dateJoined = dateJoined;
    }
     
    public int getDateJoined()
    {
    return dateJoined;
    }

     
    public class Club
    {
     
    private int janMembers =0;
    private int febMembers = 0;
    private int marMembers = 0;
    private int aprMembers = 0;
    private int mayMembers = 0;
    private int junMembers = 0;
    private int julMembers = 0;
    private int augMembers = 0;
    private int sepMembers = 0;
    private int octMembers = 0;
    private int novMembers = 0;
    private int decMembers = 0;
     
    public Club()
    {
    memberList = new ArrayList<Member>();
     
    }
     
     
    public void add(Member m)
    {
    memberList.add(m);
    }
     
     
    public int getMembersInMonth(int month)
    {
     
    if (month < 1 || month >12)
    return -1;
    for (int i =0; i < memberList.size(); i++)
    {
    if (memberList.get(i).getDateJoined() == 1)
    {
    janMembers++;
    }
     
    else if (memberList.get(i).getDateJoined() ==2)
    {
    febMembers++;
    }
     
    else if (memberList.get(i).getDateJoined() ==3)
    {
    marMembers++;
    }
     
    else if (memberList.get(i).getDateJoined() ==4)
    {
    aprMembers++;
    }
     
    else if (memberList.get(i).getDateJoined() ==5)
    {
    mayMembers++;
    }
     
    else if (memberList.get(i).getDateJoined() ==6)
    {
    junMembers++;
    }
     
    else if (memberList.get(i).getDateJoined() ==7)
    {
    julMembers++;
    }
     
    else if (memberList.get(i).getDateJoined() ==8)
    {
    augMembers++:
    }
     
    else if (memberList.get(i).getDateJoined() ==9)
    {
    sepMembers++;
    }
     
    else if (memberList.get(i).getDateJoined() ==10)
    {
    octMembers++;
    }
     
    else if (memberList.get(i).getDateJoined() ==11)
    {
    novMembers++:
    }
     
    else
    {
    decMembers++;
    }
    }
     
    if (month ==1)
    {
    return janMembers;
    }
     
    else if (month ==2)
    {
    return febMembers;
    }
     
    else if (month ==3)
    {
    return marMembers;
    }
     
    else if (month ==4)
    {
    return aprMembers;
    }
     
    else if (month ==5)
    {
    return mayMembers;
    }
     
    else if (month ==6)
    {
    return junMembers;
    }
     
    else if (month ==7)
    {
    return julMembers;
    }
     
    else if (month ==8)
    {
    return augMembers;
    }
     
    else if (month ==9)
    {
    return sepMembers;
    }
     
    else if (month ==10)
    {
    return octMembers;
    }
     
    else if (month ==11)
    {
    return novMembers;
    }
     
    else
    {
    return decMembers;
    }
    }

  12. #12
    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: looping and arrays

    OP- The suggestions you were given are pretty terrible, and I hope you recognize them as such. Stick with my advice.

    At the very least, the bad examples do include some proper syntax on iterating through an ArrayList. Can you go from there?

    Again, please don't follow the other advice you were given. There is no need for nested looping, 12 variables, or any of that nonsense.

    Guys- Like I keep saying, spoonfeeding is NOT helping. And spoonfeeding incorrect answers is even worse- it really hurts people coming here for valid advice.

    Mods- This thread is a perfect example of what I was talking about earlier.
    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!

  13. #13
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Angry Re: looping and arrays

    Quote Originally Posted by KevinWorkman View Post
    OP- The suggestions you were given are pretty terrible, and I hope you recognize them as such. Stick with my advice.

    At the very least, the bad examples do include some proper syntax on iterating through an ArrayList. Can you go from there?

    Again, please don't follow the other advice you were given. There is no need for nested looping, 12 variables, or any of that nonsense.

    Guys- Like I keep saying, spoonfeeding is NOT helping. And spoonfeeding incorrect answers is even worse- it really hurts people coming here for valid advice.

    Mods- This thread is a perfect example of what I was talking about earlier.
    Ok, this is as simple as I can get it and I doubt even the All Knowing Java Guru Kevin Workman can make this simpler.

    Checking to see if a Member joined in a month would be easy.
    In the Member class do this.
    public boolean joinedInMonth( int month)
    {
    if (getDateJoined() == month)
    return true;
    else
    return false;
     
    }

    All right, this is the very best I can do, this would return how many would have in a month, for just that month only.
    In the Club class.

     
    public int joinedInMonth2(int month)
    {
    int membersJoinedInThisMonth = 0;
    for (int i =0; i < memberList.size(); i++)
    {
    if (memberList.get(i).joinedInMonth(month))
    membersJoinedThisMonth++;
    }
    return membersJoinedThisMonth;
    }

    And if KW has any ideas better than this, he should show them.
    Last edited by javapenguin; January 6th, 2011 at 10:09 PM.

  14. #14
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: looping and arrays

    Javapenguin...first, KevinWorkman's points were completely valid (incorrect advice is never a good thing) so there is no need to respond in a sarcastic manner - learn from it. Second, your latest post does exactly what was suggested long ago in this thread.

  15. The Following User Says Thank You to copeg For This Useful Post:

    javapenguin (January 6th, 2011)

  16. #15
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Smile Re: looping and arrays

    Quote Originally Posted by copeg View Post
    Javapenguin...first, KevinWorkman's points were completely valid (incorrect advice is never a good thing) so there is no need to respond in a sarcastic manner - learn from it. Second, your latest post does exactly what was suggested long ago in this thread.
    Well, I don't usually call other's advice "nonsense" and stuff like that, even if it's blatantly wrong.

  17. #16
    Member
    Join Date
    Dec 2010
    Posts
    46
    Thanks
    0
    Thanked 10 Times in 10 Posts

    Default Re: looping and arrays

    Quote Originally Posted by Trunk Monkeey View Post
    I only have the one arraylist which would have all the members that have joined.
    I want a part of the code that checks each member on the list to see if they joined in that certain month and add a number everytime there is a member joined in that month
    you can keep an integer array for the month that stores the count of members. an example
    int[] monthfreq  = {0,0,0,0,0,0,0,0,0,0,0,0};
    each position of this array correspond to the month, ie, Jan, Feb. etc
    So when you insert the new member, increment the array as well.. for example if its in Feb,
    monthfreq[ 1 ]++;
    as for the method of how to get the month, you can create a getMonth() method and the return value can be used in like : monthfreq [ return value of getMonth ]++

  18. #17
    Member
    Join Date
    Dec 2010
    Posts
    46
    Thanks
    0
    Thanked 10 Times in 10 Posts

    Default Re: looping and arrays

    Quote Originally Posted by KevinWorkman View Post
    If it matches the input month, increment a variable.
    Increment a variable? What variable? A global variable? What does the variable represent? This is an example of providing advice and NOT helping at all.

  19. #18
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: looping and arrays

    Quote Originally Posted by JavaHater View Post
    Increment a variable? What variable? A global variable? What does the variable represent? This is an example of providing advice and NOT helping at all.
    I see it as completely the opposite, helping quite a bit and letting the original poster decide how to implement it which is a learning process unto itself. But of course its all relative, and only truly helpful if it helps the original poster: we can't speak for them, so if they are still confused I recommend they ask

  20. #19
    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: looping and arrays

    Quote Originally Posted by JavaHater View Post
    Increment a variable? What variable? A global variable? What does the variable represent? This is an example of providing advice and NOT helping at all.
    javapenguin eventually arrived at exactly what I suggested although I still stand by my statements about spoonfeeding not being helpful.

    The advice, including yours, that involved 12 variables, or an array of 12 variables, shows a fundamental problem with novices trying to post full solutions: the original requirements said nothing about determining how many members joined in each month. The original requirement simply calls for a single loop and a single incremented variable.

    Pointing the OP in that direction is much more helpful than providing a solution that, if handed in, would have resulted in a failing grade.

    Yet again, this showcases yet another reason why offering full solutions (especially if you're a novice programmer, as you and javapenguin both seem to be) is problematic. Oftentimes the OP's requirements might be unclear (or another novice programmer might not understand them completely), so the "full solution" won't even fulfill the requirements anyway. That inevitably leads to confusion, not just for the OP, but for anybody who might have actually helped glancing at the thread and believing that a solution has already been found, when indeed one has not.
    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!

  21. #20
    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: looping and arrays

    Quote Originally Posted by javapenguin View Post
    Well, I don't usually call other's advice "nonsense" and stuff like that, even if it's blatantly wrong.
    I'm sorry javapenguin, I don't like to be mean to you, but this is not the first time you've provided a spoonfed "full solution" that bears little resemblance to the original requirements. That's not helpful at all, and in fact will almost definitely confuse the OP. As I'm here to help, I have to point out when the advice you (or anybody) give is "blatantly wrong".

    I know you mean well, but I don't understand why you insist on providing full solutions that are oftentimes worse than the OP's original attempts. I don't automatically hate all novice programmers or anything (if I did, I wouldn't be here), but it's really frustrating to see you, again and again, offer "help" that is actually detrimental to the OP's understanding of the topic.

    I have no control over what you do, but I would urge you to perhaps wait until your own understanding of Java is at a more advanced level before you attempt to provide solutions- and by then, I would hope that your compulsion to provide spoonfed answers would subside.

    I don't really understand why you (and many other novice programmers) feel the need to provide full solutions, which are oftentimes very incorrect. Again, I have no control over what you do, but I really don't get it.
    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!

  22. #21
    Member
    Join Date
    Dec 2010
    Posts
    46
    Thanks
    0
    Thanked 10 Times in 10 Posts

    Default Re: looping and arrays

    Quote Originally Posted by KevinWorkman View Post
    The advice, including yours, that involved 12 variables, or an array of 12 variables, shows a fundamental problem with novices trying to post full solutions: the original requirements said nothing about determining how many members joined in each month. The original requirement simply calls for a single loop and a single incremented variable.
    the requirement also said nothing about anything else. Its left for us to interpret. You are a super genius to only stop at one level. However, I went a bit far ahead to suggest he keeps a score of all members that join in a month. His full application may want to print a report of all members that join in month, for example. Obviously, you have more experience in a academic level than in a professional level.

  23. #22
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Exclamation Re: looping and arrays

    Quote Originally Posted by JavaHater View Post
    the requirement also said nothing about anything else. Its left for us to interpret. You are a super genius to only stop at one level. However, I went a bit far ahead to suggest he keeps a score of all members that join in a month. His full application may want to print a report of all members that join in month, for example. Obviously, you have more experience in a academic level than in a professional level.

    Please, let's not start that argument up again.


    JavaHater....hey, why are you even here if you hate java?

    But KW is right about the spoonfeeding thing. I just was too blind to see it. I thought that by helping them by doing it for them..or as much as I could, I could save them hours of trying to put a square peg in a round hole and wondering why it didn't work. That and I know how it feels to be getting nowhere after spending several hours. But I was really overdoing it and am now trying to shorten my answers. Now I know that, though it can be really annoying to learn stuff slowly, it may be the best way, though I'm still not against getting or giving help. I've got to read the book more, if I can. Sometimes these classes, along with others that get in the way, leave me with less time to read the book and most of the learning from writing programs. However, it may be a bit better had I read the book. I'd be quite a bit farther along now than I am. The only reason I wasn't beaten is because I spent the summer studying up on it and stuff like that. Then I tried to become a moderator by helping people and getting the notice of JavaPF so I could become one. However, I got so eager that I was almost sorta hoping to get thanked, which often I didn't. After a while I just did it to be helpful, not hoping, too much, for any gain from it, though I still did and still do want to be a moderator. Anyway, I can always study when I have more time. I probably can't say how to make a Tree that well, though I can guess. I can make at least, well maybe, a binary tree. Now enough with this debate, at least here. Am creating thread in Java Café about it. Let's deal with it there from now on and stop the name calling and all that stuff in this forum before we all get in big trouble.
    Last edited by javapenguin; January 7th, 2011 at 10:09 PM.

  24. #23
    Member
    Join Date
    Dec 2010
    Posts
    46
    Thanks
    0
    Thanked 10 Times in 10 Posts

    Default Re: looping and arrays

    Quote Originally Posted by javapenguin View Post

    Please, let's not start that argument up again.
    it takes 2 hands to clap remember?

    JavaHater....hey, why are you even here if you hate java?
    don't take it seriously

    But KW is right about the spoonfeeding thing.
    Its 50 - 50. Giving examples for them to have a start is also all right. So there is no reason for you to stop. Even if you do post something that self proclaimed geniuses like KW don't see eye to eye, you can also hear from other's opinions about your code. Its also part of learning.

  25. #24
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: looping and arrays

    This is the second time in as many days that a thread has been hijacked by the same people to discuss the same issue...as mentioned on the other occasion: make a new thread if you wish to discuss it.

    I am locking this thread...to the original poster, if your question was not as thoroughly addressed as you would like I suggest updating your code and posting questions with code in a new thread. My apologies for all the distraction.
    Last edited by copeg; January 7th, 2011 at 10:20 PM.

  26. The Following User Says Thank You to copeg For This Useful Post:

    javapenguin (January 7th, 2011)

Similar Threads

  1. Help in looping
    By endframe in forum What's Wrong With My Code?
    Replies: 5
    Last Post: December 28th, 2010, 03:24 PM
  2. Looping with an ArrayList
    By EmSaint in forum Loops & Control Statements
    Replies: 3
    Last Post: September 23rd, 2010, 12:06 AM
  3. Looping Question
    By miss confused in forum What's Wrong With My Code?
    Replies: 9
    Last Post: June 30th, 2010, 12:46 PM
  4. Not Looping? (do - while) bad execution!
    By chronoz13 in forum Loops & Control Statements
    Replies: 1
    Last Post: November 23rd, 2009, 08:51 PM
  5. [SOLVED] looping, for,while,do-while.
    By chronoz13 in forum Loops & Control Statements
    Replies: 4
    Last Post: August 6th, 2009, 01:32 PM

Tags for this Thread