add polymorphism example

This commit is contained in:
Oleksii Aleshchenko
2023-03-02 15:26:42 +02:00
parent 4b159fa22b
commit 429bcc7b3d
8 changed files with 123 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
package encapsulationInheritancePolymorphism.polymorphism;
public class FuelEngine extends Engine {
private String fuelType;
public int getPower() {
return 50;
}
}