• Post Reply Bookmark Topic Watch Topic
  • New Topic

generics, default instantiation  RSS feed

 
M Berg
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, is there any impact in generics behaviour if the later <> is forgotten or left away from instantiation?
I could not find any impact with simple tests...



Many thanks again,
Kind regards MB
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All you'll get is a warning, but during runtime there is no difference. That's because the generic information is removed; look up type erasure for more info.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!