public class Tulip
{
private int numTulips;
public Tulip(int nt)
{
numTulips = nt;
}
public String toString()
{
return "numTulips: " + numTulips;
}
}
what is demonstrated by the Tulip class declaration?
a. implementing an abstract method
b. implementing an abstract interface
c. composition
d. overriding an inherited method
e. multiple inheritance
-------------------------------------------------------------
first, java doesnt have multiple inheritance so (e) cant be true, and
i dont think it inherites anything so to me (d) is false as well.
|