public static void linejnyj(int[] a,
            int key) {
        double time = -System.currentTimeMillis();
        boolean flag = false;
        for (int i = 0; i < a.length; i++) {
            if (a[i] == key) {
                System.out.println("pozicija " + (i + 1));
                flag = true;
            }
        }
        if (!flag) {
            System.out.println("Rezultat ne najden");
        }
        time += System.currentTimeMillis();
        System.out.println("vremja " + time);

    }