public interface Car {
String getName();
}
public class Audi implements Car {
@Override
public String getName() {
return "audi";
}
}
public class Benz implements Car {
@Override
public String getName() {
return "Benz";
}
}
public class Bmw implements Car {
@Override
public String getName() {
return "Bmw";
}
}
网友评论