check if array is sorted

In this article, we are going to check if the array is sorted using java. Example:- If arr=[1,2,3,4,5], then the output will be yes. because it is sorted. if arr=[2,4,6,10,8], then the output will be no. because it is not sorted. Steps:- Java code to check if array is sorted or not:- Output:- You can … Read more

Array input in java

In this article, we are going to see how we can take array input in java using a scanner. What is an Array? Array is the collection of similar data type value. Length of an array is fixed we can’t change length of an array after declaration. Memory allocation in array is contiguous. Array Declaration … Read more