I have a class that creates the object of type Smo. The object then calls a static method from another class. The static method requires that I pass the object to it that is calling it. How do I designate the calling object as the parameter to pass.
For example:
class Smo {
Smo() {
}
void sponge() {
car.dancing(??????); //////< ----------- how do I refer to self?
}
void dance() {
//// do a little dance
}
}
class Car() {
Car() {
}
dancing(Smo smo) {
smo.dance();
}
}