I created a code for Fibonacci numbers, but it doesn't compile and I don't know why, can someone help. (And I also think that the last like with k-1 + k-2 doesn't make any sense.
public class Fibonacci {
public static void main(String[] args) {
int n = Integer.parseInt(args[n]);
System.out.println(FibNum(n));
}
public static int FibNum(int k) {
if (k == 0) return 0;
if (k == 1) return 1; else return k - 1 + k - 2;
}
}