What are Wildcards in Java Generics (?, extends, super)?

Wildcards in Java Generics provide flexibility when working with different types. Instead of specifying an exact type, you can use ? to…