The generic class has the same behavior for all of its possible parametric types. The same generic class can be viewed each time as if it has a different parametric type. For the JVM it doesn’t matter which parametric type we chose to instantiate a generic class with. In all cases, for the JVM it is the same class. Generics implementation in Java is in the compiler level. The following video clips show that.
The Visitor Design Pattern
The visitor design pattern allows us to add operations to objects that already exist without modifying their classes and without extending them.