From 790b07679ccfef5e56e8c50ab7fd9174d70eb90f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9DNyymix=E2=80=9D?= Date: Fri, 29 Apr 2022 10:32:32 +0300 Subject: [PATCH] Clean code --- Fibo.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Fibo.java b/Fibo.java index a9c8093..0bcc32a 100644 --- a/Fibo.java +++ b/Fibo.java @@ -1,6 +1,7 @@ + // Fibonacci number generator in Java using recursion public class Fibo { - static final int count = 40; + static final int COUNT = 40; private static long fibo(int i){ if (i < 3) @@ -10,9 +11,9 @@ } public static void main(String[] args) { - System.out.println("Lasketaan fibo: " + count); + System.out.println("Lasketaan fibo: " + COUNT); long before = System.currentTimeMillis(); - for (int i=1; i <= count; i++) + for (int i=1; i <= COUNT; i++) System.out.println("Fibo: " + i + " = " + fibo(i)); long after = System.currentTimeMillis(); System.out.println("Laskenta kesti: " + (after - before) + " ms");