• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Create a object of the given generic class

 
Michael Krimgen
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers,

If you try to create the following generic class, the compiler will give a warning as the class Stupid is final.
It is obviously impossible to create a (parametrized) object of Generic as the type parameter can only be Stupid,
but the class itself does not implement the interface Runnable.



For the following class, the compiler does not give any warning, so I assume it might be possible to create an object of the class, using
type parametrization.



However, I did not yet succeed to find a way to create an object of the class. Any ideas?

Sorry for the naming of the inner class :-)
 
Campbell Ritchie
Sheriff
Pie
Posts: 49796
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why have you got an inner class in the first place?
 
Michael Krimgen
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it's not really about the "why", but more about if possible or not :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic