Hi;
Can anyone point out the mistake in this code?

package com.codegym.task.task02.task0216;
/*
Minimum of three numbers
*/
public class Solution {
public static int min(int a, int b, int c) {
//write your code here
if (a < b && a < c){
return a;
} else if (b < c && b < a) {
return b;
} else if (c < b && c < a) {
return c;
}
}
}
public static void main(String[] args) throws Exception {
System.out.println(min(1, 2, 3));
System.out.println(min(-1, -2, -3));
System.out.println(min(3, 5, 3));
System.out.println(min(5, 5, 10));
}
}

if a is less than b and a is less than c then return a2)else if b is less than c and b is less than a then return b3)else if c is less than b and c is less than a then return clets plug in a= 1, b =2, and c = 3: 1)is 1 less than 2 = true && is 1 less than 3 = trueA will be returned lets plug is a = 1, b = 2, and c = 1: 1)is 1 less than 2 = true && is 1 less than 1 = falsego to next line 2)is 2 less than 1 = falsego to next line 3)is 1 less than 2 = true && is 1 less than 1 = falsego to next line but there is no next line and that leaves a case where nothing could be returned, which is not allowed in java. You need to add in code that checks to see if numbers could be equal to each other, this should fix your problem, along with removing the extra } on line either 17 (or 18).or equal tob and a is less thanor equal toc then return a.