Java: “error: cannot find symbol”

前端 未结 3 885
借酒劲吻你
借酒劲吻你 2021-01-18 19:56

(Rookie mistake, I\'m sure.)

I\'m a first year computer science student, and attempting to write a program for an assignment, with the code;

import          


        
3条回答
  •  南方客
    南方客 (楼主)
    2021-01-18 20:30

    You must declare the variable n in public static void calcNumFactors()

    In your code, you have to pass the value of n as an argument to the function calcNumFactors() as Hovercraft Full Of Eels said.

提交回复
热议问题