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

How does Java 7 handle "Generics"

 
Ed Bicker
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome Jeff. How does Java 7 handle "Generics"? Compare this to Java 5?
 
Jeffrey Friesen
Author
Ranch Hand
Posts: 67
5
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ed,

Java 7 introduced the @SafeVarargs compiler annotation to suppress certain warning messages when invoking a varargs method (a method with a variable number of arguments). Also, as pointed out on Web pages such as "Changes in access of variables for generic classes in Java 7" (http://stackoverflow.com/questions/10782876/changes-in-access-of-variables-for-generic-classes-in-java-7), certain generics-oriented code that compiled under Java 6 no longer compiles under Java 7. As far as I know, this is the extent of generics changes.

All the best.

Jeff
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic