public static int abs(int a) {
    if (a < 0) {
        return -a;
    } else {
        return a;
    }
}
So I have already completed this task but I was just wondering if someone could explain to me exactly what the statement above is actually doing. It seems like it's probably something so obvious, but I just can't get my head around it.