I want to create an abstract class in java that forces all its subclasses to implement a SwingWorker
(plus the SwingWorker
's abstract doInBackground()
and done()
).
In AbstractClass -
abstract class Task extends SwingWorker<Void, Void>{};
I would expect this to cause the compiler to throw an exception when an extended class doesn't implement it, but it doesn't.
I am also not quite sure how I would go about indicating that I'm overriding this abstract class. Do I redeclare it in the ConcreteClass as follows?
class Task extends SwingWorker<Void, Void>{
...
}
or some other way?
Thanks for all your help!