Here’s what I’m thinking. So lets say I have a class called intro and I want to do something when it starts and finishes. I’m wondering how could I do something like this:
public Main(){
//Calls the object that overrides its own methods
new Intro(){
@Override
public void onStartIntro(){
}
@Override
public void onFinishIntro(){
}
}
What would need to happen in the Intro class to enable something like this?
just create an abstract class to force overriding of the methods (but a non-abstract class with non-final methods will also do)