Here is a comparison table between a function and a class method. Choose the right descriptions for each element.
Class methods
Let's compare!
Report a typo
Choose one or more options for each row
| Function | Class Method | |
|---|---|---|
| Can have default parameters | ||
| Has access to public fields of the class | ||
| Has access to private class functions | ||
| Has access to private fields of the class |
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.