blob: 521a626a23b810dc2c914b117c1613fcec8bec17 [file]
class Cat {}
class DomesticCat extends Cat {}
class Test {
public static void main(String[] args) {
petCat((Cat) new DomesticCat());
}
static void petCat(Cat cat) {
System.out.println("A Cat");
}
static void petCat(DomesticCat domesticCat) {
System.out.println("A DomesticCat");
}
}