It says variable c might not have been initialized.
I've declared the c variable as an int. Don't know what wrong. Please help
package com.codegym.task.task02.task0214;
/*
Minimum of two numbers
*/
public class Solution {
public static int min(int a, int b) {
//write your code here
int c;
if (a < b){
a = c;
}
else if (b < a){
b = c;
}
else {
}
return c;
}
public static void main(String[] args) throws Exception {
System.out.println(min(12, 33));
System.out.println(min(-20, 0));
System.out.println(min(-10, -20));
}
}