OnJava8-Examples/typeinfo/BoundedClassReferences.java
2015-11-03 12:00:44 -08:00

12 lines
299 B
Java

// typeinfo/BoundedClassReferences.java
public class BoundedClassReferences {
public static void main(String[] args) {
Class<? extends Number> bounded = int.class;
bounded = double.class;
bounded = Number.class;
// Or anything else derived from Number.
}
}
/* Output: (None) */