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

13 lines
405 B
Java

//: typeinfo/GenericClassReferences.java
// ©2015 MindView LLC: see Copyright.txt
public class GenericClassReferences {
public static void main(String[] args) {
Class intClass = int.class;
Class<Integer> genericIntClass = int.class;
genericIntClass = Integer.class; // Same thing
intClass = double.class;
// genericIntClass = double.class; // Illegal
}
} /* Output: (None) *///:~