#Help with simple java function (beginner)

1 messages · Page 1 of 1 (latest)

primal barnBOT
#

<@&987246399047479336> please have a look, thanks.

stable tree
#

Whats the question?

midnight surge
#

How would you write this in python?

fringe obsidian
#

Hope it helps you

/**
 * public  indicates that the method can be accessed from any class, not just the class it's defined in.
 * static  signifies that the method is associated with the class itself
 *         rather than requiring an object instance to be called.
 *         You can directly call the method using the class name followed by a dot (.).
 * double the return type of the method.
 * @param list
 * @return
 */
public static double minValue(double[] list){
    return Arrays.stream(list).min().getAsDouble();
}