Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

passing array to function java

public int min(int [] array) {
      int min = array[0];
   
      for(int i = 0; i<array.length; i++ ) {
         if(array[i]<min) {
            min = array[i];
         }
      }
      return min;
   }
int minimum = min(myArray)
 
PREVIOUS NEXT
Tagged: #passing #array #function #java
ADD COMMENT
Topic
Name
4+4 =