Computer Science, asked by shruthi1426, 1 year ago

How to find Min/Max numbers in a java array?

Answers

Answered by Saimrock78
2

import java.

util. Arrays;

public class MinMaxValues{

public static void main (String args[]){

int numbers[]= {1,5,-9,12,-3,89, 18,23,4,-6};

//Find minimum (lowest) value in array using loop.

System. out. println("Minimum Value = " + getMinValue(numbers));

//Find maximum (largest) value in array using loop.

System. out.

Similar questions