Este conteúdo não está disponível no idioma selecionado.
4.3. Additional Information
4.3.1. Implementing Inheritance Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
A subclass must also observe the first and second rules. It inherits its identifier property from the superclass,
Cat. For example:
package eg;
public class DomesticCat extends Cat {
private String name;
public String getName() {
return name;
}
protected void setName(String name) {
this.name=name;
}
}