I have an OOP question about polymorphism I was hoping someone could help me with.
Basically i’m wondering what the advantage of using an Interface is over calling a function from the constructor, for example how is this:
package {
public class Thing {
public function Thing() {
init();
}
private function init():void {
}
}
}
different from:
package {
public class Thing implements init {
public function Thing() {
}
private function init():void {
}
}
}
package {
public interface init {
function init();
}
}