Advertisement
Ligh7_of_H3av3n

корекция на код

Feb 11th, 2024
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1. else {
  2.     for (int positionList1 = 0; positionList1 < firstList.size(); positionList1++) {
  3.         newList.add(positionList1 * 2, firstList.get(positionList1));
  4.     }
  5.     int currentPositions = 1;
  6.  
  7.     for (int positionList2 = 0; positionList2 < secondList.size(); positionList2++) {
  8.         newList.add(currentPositions, secondList.get(positionList2));
  9.         currentPositions += 2;
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement