[Bluej-discuss] Error message in BlueJ launch

Lon Levy lxl at oregon.k12.wi.us
Sat Jan 20 18:55:36 GMT 2007


This can be done through inheritance and interfaces.  So if you have an abstract class Mammal and an interface EggLayers, you could write 

  public class SpinyAnteater extends Mammal implements EggLayers

In Java you can extend exactly one class, but you can implement many interfaces.

Good luck!

Lon Levy, MS-CSEd
Computer Science Teacher
Volunteer Computer Club Advisor
Oregon High School
608-835-4469
lxl at oregon.k12.wi.us

non somnos requiem

>>> "Parminder Hundal" <parhundal at hotmail.com> 01/18/07 6:13 PM >>>
Hello I just had a question and was wondering if someone can help me out?  I just wanted to know if a object can have several different classes?  If someone knows can they explain to me why this is the case.  I think an object can have several different classes.  If you look at the spiny anteater it is both a mammal and an egg-laying specimen.


More information about the bluej-discuss mailing list