Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static boolean isSortedDescending(Comparable[] array) {
- for(int i = 0; i < array.length - 1; i++) {
- if(array[i].compareTo(array[i + 1]) < 0)
- return false;
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement