Java - Write code to get minimum of three integers using nested Math.min method without using if statements

Requirements

Write code to get the minimum number of three.

You cannot use if statements.

Hint

Use nested methods

Demo

//package com.book2s;

public class Main {
    public static void main(String[] argv) {
        int a = 42;
        int b = 42;
        int c = 42;
        System.out.println(minimum(a, b, c));
    }/*from  w  w  w  .j a  v  a  2  s  .  c  o  m*/

    private static int minimum(int a, int b, int c) {
        return Math.min(Math.min(a, b), c);
    }
}

Related Exercise