Animal
public abstract class Animal { String name; public Animal(String name) { this.name = name; } }
Lion<
If your method is not polymorphic you can't do without the cast. To make it polymorphic, declare a method in the base class and override it in the descendant classes.