Last active
December 26, 2015 09:28
-
-
Save tnhansel/7129262 to your computer and use it in GitHub Desktop.
search algorithm
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; | |
public class Search { | |
public static void searchComputer(ArrayList<MobileComputer> arrayList){ | |
MobileComputer a; | |
boolean found = false; | |
for (int i=0; i<arrayList.size(); i++ ){ | |
if (arrayList.get(i).getSerialNumber()>arrayList.get(i+1).getSerialNumber()){ | |
a = arrayList.get(i); | |
found = true; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sorry, I haven't done anything. Kmrn alu bljr statistcs and ketiduran. I'll try it