Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inheritance with two Children?

 
Rik Ny
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I have an abstract class with two children, then how do I create an object of each of the children from the driver??
Cheers,
 
Marilyn de Queiroz
Sheriff
Posts: 9063
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Child1 child1 = new Child1();
Child2 child2 = new Child2();
or
Abstract child1 = new Child1();
Abstract child2 = new Child2();
??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic