So I was looking at a tutorial and saw this line of code:
Thread timer = new Thread() {
@Override
public void run(){
// etc....
}
}
What is happening here? They are creating a new object of the Thread class and declaring the method run when creating that object? How is this possible? My understanding was that an object got its methods from its class?