aspose file tools*
The moose likes Features new in Java 7 and the fly likes How does Java 7 handle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Features new in Java 7
Bookmark "How does Java 7 handle "Generics"" Watch "How does Java 7 handle "Generics"" New topic
Author

How does Java 7 handle "Generics"

Ed Bicker
Greenhorn

Joined: Oct 14, 2003
Posts: 12
Welcome Jeff. How does Java 7 handle "Generics"? Compare this to Java 5?
Jeffrey Friesen
Author
Ranch Hand

Joined: Dec 29, 2012
Posts: 67
    
    5

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
 
Consider Paul's rocket mass heater.
 
subject: How does Java 7 handle "Generics"