Is the complexity of this problem actually worth effort? Where is a similar example?

package com.codegym.task.task02.task0217;
/*
Minimum of four numbers
*/
public class Solution {
public static int min(int a, int b, int c, int d) {
//write your code here
int _min = 0;
if (a < b) _min = a;
if (b < a) _min = b;
// if (a < b && b < c && c < d) _min = a;
//if (b < a && a < c && c < d) _min = b;
//if (c < d && d < a && a < b) _min = a;
// if (a < c && c < b && b < d) _min = a;
// if (c < a && a < b && b < d) _min = b;
//if (c < b && b < a && a < d) _min = a;
if (c < a && a < b && b < d) _min = c;
if (d < a && a < b && b < c) _min = d;
return _min;
}
public static int min(int a, int b) {
//write your code here
int _min = 0;
if (a < b) _min = a;
if (b < a) _min = b;
return _min;
}
public static void main(String[] args) throws Exception {
System.out.println(min(-20, -10));
System.out.println(min(-20, -10, -30, -40));
System.out.println(min(-20, -10, -30, 40));
System.out.println(min(-40, -10, -30, 40));
}
}

ais less thanbthen checking ifbis less thanayour code misses a whole other situation: when a and b are equal. In that case the code above would return 0 and that would be incorrect. Using an if statement to compare the two numbers you can determine ifais less thanb. What would the logical conclusion if that statement returns false? That would mean that b has to be less than or equal to a. So either return the value ofaifais less thanb, or return the value ofbotherwise.