How to use java lower-bound wildcards
Most people do not understand the knowledge points of this article "how to use java lower-bound wildcards", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "java lower-bound wildcard how to use" article.
Description
1. Lower-bound wildcards restrict unknown types to specific types or supertypes.
2. Lower-bound wildcards use wildcards ('?').
It is followed by the super keyword, followed by its lower limit.
< ?super A >.
3. The class instantiated by the wildcard must be the current class or the superclass of the current class.
When storing data, the data type can only be the current class or a superclass of the current class.
Example
Public static void addNumbers (List