Updated the previous variable in loop (#7205)

This commit is contained in:
Kamlesh Kumar 2019-06-29 18:54:06 +05:30 committed by KevinGilmore
parent 2235c2e780
commit a14dc0d889
1 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,7 @@ public class SortedListChecker {
if (previous.compareTo(current) > 0) {
return false;
}
previous = current;
}
return true;
}
@ -43,6 +44,7 @@ public class SortedListChecker {
if (employeeComparator.compare(previous, current) > 0) {
return false;
}
previous = current;
}
return true;
}