Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to get the smallest number in an array java

int min = arr[0];
for(int j = 0; j<arr.length ; j++){		
    if(arr[j]<min){
    	min = arr[i];
    }
    return min;  
}
 
PREVIOUS NEXT
Tagged: #smallest #number #array #java
ADD COMMENT
Topic
Name
4+5 =