Java - Abstraction
Examine the code below and identify the compilation error:
abstract class Appliance {
abstract void operate();
}
class Washer extends Appliance {
void operate() {
System.out.println("Washing clothes");
}
}
class Dryer extends Appliance {
}
public class Test {
public static void main(String[] args) {
Appliance d = new Dryer();
d.operate();
}
}