Type parameters for JAVA generics the place to note __java

Source: Internet
Author: User

Rules and restrictions
  
1. A generic type parameter can only be a class type (including a custom class) and cannot be a simple type.
2. The same generic type can correspond to multiple versions (because the parameter types are indeterminate) and different versions of generic class instances are incompatible.
3, the generic type parameter can have more than one.
4. The parameter types of the generic type can use extends statements, such as <t extends Superclass>. It is customarily called "bounded type".
5. The parameter type of the generic type can also be a wildcard character type. For example class<?> ClassType = Class.forName ("java.lang.String");




http://www.iteye.com/problems/80418

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.