#2877 Beginner to Fantom and F4

johndoe Sun 16 Oct

Hello everyone! So I'm currently going through the process of learning Fantom at the moment. I chose the F4 IDE as my way to work with the language. My main question is how do I use multiple classes in Fantom when I have them created in a separate fantom class? For example, I have a main class and dostuff class. How do I inherit the functions I have created in the dostuff fantom class?

Thanks for any assistance.

SlimerDude Sun 16 Oct

Hi Johndoe,

The Fantom documentation chapter on Inheritance explains how sublasses work in Fantom. But briefly, the syntax looks like this:

class MyClass : SubClass {

    ...

}

In that example, MyClass will inherit all methods and fields from SubClass.

Login or Signup to reply.