How to check the ordering of arrays by java
This article will explain in detail how java checks the order of arrays. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Check the ordering of the array
Given an integer array, determine whether the array is ordered (ascending order)
Public static boolean isUp (int [] array) {for (int I = 0; I array [item1]) {return false;}} return true;} public static void main (String [] args) {int [] array = {12, 13, 14, 14, 15, 16, 17, 18; System.out.println (isUp (array));}}
Print the results:
This is the end of this article on "how to check the order of arrays in java". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.