Last active
January 20, 2017 19:30
-
-
Save appikonda/242a80f12a567e77d57e1359acc5700c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
public class getIndexs { | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
List<Integer> fooList = new ArrayList<Integer>(); | |
List<Integer> booList = new ArrayList<Integer>(); | |
for (int i = 0; i < 5; i++) { | |
fooList.add(i, i+1); | |
} | |
for (int i = 0; i < 5; i++) { | |
booList.add(i, i+9); | |
} | |
for (Iterator iterator = booList.iterator(); iterator.hasNext();) { | |
Integer i = (Integer) iterator.next(); | |
//call printInt(); | |
} | |
} | |
private void printInt(int a, int b){ | |
System.out.println(a +" "+b ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment