OnJava8-Examples/typeinfo/BoundedClassReferences.java
Bruce Eckel 49edcc8b17 reorg
2015-06-15 17:47:35 -07:00

12 lines
345 B
Java

//: typeinfo/BoundedClassReferences.java
// ©2015 MindView LLC: see Copyright.txt
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) *///:~