recursive fibonacci

Run Settings
LanguageJava
Language Version
Run Command
class Main { public static void main(String[] args) { System.out.println(fib(6)); } public static int fib(int a){ if(a <=0){ return 0; } else if (a <= 1){ return 1; } return fib(a-1) + fib(a-2); } }
Editor Settings
Theme
Key bindings
Full width
Lines