Home / MCQ Bank / Computer
Computer Classes And Objects In Python

What is the purpose of the @classmethod decorator in Python classes?

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • It defines a method that belongs to the class and not the instance

Related Computer Questions

What will happen after compiling this program code? abstract class MyClass{ //line 1 private int a, b; public void call(int a, int b){ this.a = a; this.b = b; System.out.print(a+b); } } public class Test{ public static void main(String args[]){ MyClass m = new MyClass(); //line 2 m.call(12,25); } } Which part of computer performs functions similar to the cerebrums of the above cardiac and nervous system of a human body. Which algorithm is used to find the least cost path from source node to destination node? What will be the output of the following C# code? static void Main(string[] args) { float a = 10.553f; long b = 12L; int c; c = Convert.ToInt32(a + b); Console.WriteLine(c); } The document produced by knitr document has which of the following extension?