The
General Form of a Generic Class
The generics syntax shown in
the preceding examples can be generalized. Here is the syntax for declaring a
generic class:
class class-name<type-param-list >
{ // …
Here is the full syntax for
declaring a reference to a generic class and instance creation:
class-name<type-arg-list > var-name =
new class-name<type-arg-list >(cons-arg-list);
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2026 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.