Member Functions
Last updated
What is Member Functions?
Member functions, also known as methods, are functions that are defined inside a class. They operate on the data of that class and can access its properties. You can think of them as actions that an object of that class can perform. They are declared using the fun keyword within the class body, just like regular functions, but they are associated with a specific class. Member functions are called with dot notation: Sample().foo() // creates instance of class Sample and calls foo
Free resources to learn Member Functions
- Official docsMember functions
Member Functions: common questions
Can I learn Member Functions in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Member Functions in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this Member Functions tutorial for beginners?
It is lesson 49 of 153 in the free Kotlin roadmap, in stage 17, Member Functions. If you are new to Kotlin, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.