Answers for "greatest element in array in java"

0

greatest element in array in java

private static int largest(int[] arr) { 
	int i = 0;
	int index = 0;
	for(int c = 0;c < arr.length;c++){
		if(i < arr[c]){
			i = arr[c];
			index = c;
		}
	}
	return i; 
 }
Posted by: Guest on March-08-2021

Code answers related to "greatest element in array in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language