Java inheritance samples