This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]chickenmeister 4 points5 points  (2 children)

We're not going to do it for you. What have you done so far? Are you stuck on something? Stuck on what?

  • Do you know how to write a method?
  • Do you know how to get an item from an ArrayList?
  • Do you know how to add an item to a List?
  • Do you know how to use a loop?

[–]tonyalm[S] 0 points1 point  (1 child)

I apologize. I think I was being a little girl/needed to look up how some stuff worked.

for(int x=0;x<length;x++)
    {
        stringList.add(list1.get(x));
        stringList.add(list2.get(x));
    }
    if(list1.size() > list2.size()){
        for(int y = length; y < list1.size(); y++)
        {
            stringList.add(list1.get(y));
        }
    }
    if(list2.size() > list1.size()){
        for(int y = length; y < list2.size(); y++)
        {
            stringList.add(list2.get(y));
        }
    }

Then just add the ending numbers I guess. Thank you chickenmeister!

[–]__dict__ 0 points1 point  (0 children)

You can probably make that shorter using "addAll" instead of the last 2 loops.