Java, Java Generic, Programming, Software Development, Coding.
Java’s inheritance model. Unlike arrays, generics do not maintain subtype relationships: List<Object> objList = new ArrayList<Object>(); List<String> strList = new ArrayList<String>(); // objList = strList; // This would be a compile error Even though String is a subtype of Object, a List<String>