Skip to content

motlhophisi

The special method that initializes new class instances.

Define a motlhophisi inside a mofutakwalo block to set up the initial state of every new instance created with Ntsha.

motlhophisi(diparamethara) { ... }
A class with a constructor
mofutakwalo Sediko {
  motlhophisi(r) {
    ye.r = r;
  }
}

mofutakwalo, Ntsha, ye