Munur á milli breytinga „Erfðir (forritun)“

m
ekkert breytingarágrip
m (r2.6.5) (robot Bæti við: ltg:Bērnaklase)
m
Dæmi um erfðir í [[Java]] kóða:
 
<source lang="java">
class Mammal extends Animal {
Hair m_h;
Breasts m_bHair m_h;
Breasts m_b;
Mammal reproduce() {
Mammal offspring;reproduce() {
care_for_young( Mammal offspring);
super.reproduce();
if (is_female super.reproduce()) {;
offspring =if super.give_birth(is_female();) {
offspring = super.breastfeedgive_birth(m_b);
offspring.breastfeed(m_b);
}
care_for_young(offspring);
return care_for_young(offspring);
return offspring;
}
}
}
</source>
 
== Fjölerfðir ==
15.625

breytingar