• Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference between the byte code generated for Generics and legacy collections  RSS feed

 
Pramod Krishna Murthy
Ranch Hand
Posts: 37
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Someone asked me this question. What is the difference between the byte code generated for Generics and Legacy collections. i really think from the byte code perspective there is no diff. please give me information about this.
 
Campbell Ritchie
Marshal
Posts: 56521
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would have to display the bytecode with javap -c MyClass. Because of erasure, there might be no difference at all. I don't know; I haven't tried it.
 
Pramod Krishna Murthy
Ranch Hand
Posts: 37
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply
 
Campbell Ritchie
Marshal
Posts: 56521
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!