<分区>
我在家庭作业中有这个问题:
The method
foo()
defined in the classQuiz
has the following signature:public static double foo(double f)
. What can you say aboutfoo()
?
It is a class method
It is an instance variable
It is an instance method
It is a class attribute
我认为这是一个类方法,因为 foo()
是在类中声明的。答案是否像我想的那样直截了当?