Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

min of an array java

public int min()
    {
        int min = elementData[0];
        for (int i = 1; i < size; i++)
        {
            if (elementData[i] < min)
            {
                min = elementData[i];
            }
        }
        return min;
    }
 
PREVIOUS NEXT
Tagged: #min #array #java
ADD COMMENT
Topic
Name
1+3 =