I still doesnt quite understand how i connect the two methods together.
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) {
int smallest = a;
if (smallest > b) smallest = b;
if (smallest > c) smallest = c;
if (smallest > d) smallest = d;
return smallest;
}
public static int min(int a, int b) {
int smallest1 = a;
if (smallest1 > b) smallest1 = b;
return smallest1;
}
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));
}
}