Inhetitance example with Java