public class Fibonacci { static int calculateFib(int n) { if (n <= 1) { return n; } return calculateFib(n – 1) + calculateFib(n – 2); } public static void main(String args[]) { int n = 9; System.out.println(fib(n)); // 34 // 1 + 1 + 2 + 3 + 5 + 8 + 13 + 21…Continue reading Recursive Fibonacci
Ay: Eylül 2020
Angular binding types
Templates render HTML. In a template you can use data, property binding and event binding. This is accomplished with the following syntax: # – variable declaration () – event binding [] – property binding [()] – two-way property binding {{ }} – interpolation * – structural directives The # syntax can declare local variable names which references DOM objects in a template. e.g.