Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Abstract class instance creation  RSS feed

 
kri shan
Ranch Hand
Posts: 1489
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Class.forName("com.x.y.z.Test").newInstance(); Test is the abstract class. How to create the instance for 'Test' Abstract class using newInstance() ?

 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37261
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't instantiate an abstract class.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!