Can anyone tell me what mistake I'm making?
package com.codegym.task.task04.task0409;
/*
Closest to 10
*/
public class Solution {
public static void main(String[] args) {
closeToTen(8, 11);
closeToTen(7, 14);
}
public static void closeToTen(int a, int b) {
//write your code here
int c = 10-a;
int d = 10-b;
if(c<=d)
{
System.out.println(a);
}
else
{
System.out.println(b);
}
}
public static int abs(int a) {
if (a < 0) {
return -a;
} else {
return a;
}
}
}