'Cannot resolve method in main

I wanted to write a simple code from a course I'm watching and I've stucked a little bit. I tried to change code several times, but it seems that it doesn't work. Most times I recieve an error cannot resolve method "calculateInterest" in main. Can someone describe me what am I doing wrong?


    public static void main(String[] args) {
        double[] result = produceInterestHistory(100d, 0.05d, 10);
        System.out.println(result);
    }

    static double[] produceInterestHistory(double amt, double rate, int years) {
        double[] accumulatedInterest = new double[years];
        for (int yearIndex = 0; yearIndex < years; yearIndex++) {
            int year = yearIndex + 1;
            accumulatedInterest[yearIndex] = calculateInterest(amt, rate, year);
        }
        return accumulatedInterest;
    }

}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source