I am given 4 classes, as follows.
public abstract class TennisPlayer{...}
public class GoodPlayer extends TennisPlayer{...}
public class WeakPlayer extends TennisPlayer{...}
public class Beginner extends WeakPlayer{...}
I am also given 3 declarations, as follows.
TennisPlayer g = new GoodPlayer("Sam");
TennisPlayer w = new WeakPlayer("Harry");
TennisPlayer b = new Beginner("Dick");
So my question is what would be the type for each object that is created above and why? For example the first statement, would Sam be type GoodPlayer or type TennisPlayer?