Created
January 22, 2018 02:11
-
-
Save Kun-Yao-Lin/b2bc74c5fc1eec91457e9b35af6f99af to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// savedlocation_x <- 原 List | |
List<Integer> copy2=new ArrayList<>(savedlocation_x); // 將 savedlocation_x copy 至新的 list | |
//改成下列寫法 | |
int i = 0; | |
int breakIndex = 4; | |
for(Integer in : savedlocation_x){ | |
if(i > breakIndex){ | |
break; | |
} | |
i++; | |
copy2.remove(in); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment