02、java 双层嵌套循环
一、嵌套循环 避开二级、三级、甚至更多的重复循环
String virEmpNameArray[] = {"A","B","C","D","E"};
String virEmpCodeArray[] = {"10055606","10055604","10055603","10055600","y000879"};
int temp=-1;
for(int i=0;i<virEmpNameArray.length;i++){
for(int j=0;j<virEmpCodeArray.length;j++){
if(virEmpNameArray[i]virEmpCodeArray[j]){
temp=i;
continue;
}
}
if(itemp){
continue;
}
System.out.println(virEmpNameArray[i]+"-----------"+virEmpCodeArray[i]);
}