What is the output of the following code? class A: @staticmethod def m1(self): print(‘Static Method’) @classmethod def m1(self): print(‘Class Method’) A.m1()

Questions & AnswersCategory: Programming LanguageWhat is the output of the following code? class A: @staticmethod def m1(self): print(‘Static Method’) @classmethod def m1(self): print(‘Class Method’) A.m1()
Adam asked 2 years ago

What is the output of the following code?

class A:

    @staticmethod

    def m1(self):

        print('Static Method')

    @classmethod

    def m1(self):

        print('Class Method')

A.m1()

a. Class Method
b. Static Method
c. TypeError
d. Static Method, Class Method