Java-Preliminary Understanding-sixth-class type parameters

Source: Internet
Author: User

A

The requirement now is to create n multivariable in the Create class.

The above notation brings one, code reusability is poor (improve reusability, use function function?) )

My understanding is that the function of this call is to create a lot of the same car, but the video explanation is different. In the video, the function is considered to be a car modification plant, and all the cars are changed to the exact same.

The difference is that the beginning of understanding is wrong, C1,C2 itself is existence, should be defined, now to attribute their attributes to the same. My understanding is to create a lot of cars. → This results in differences in function input.

Car C is a class type of parameters, in fact, has always been a bit curious, class type can not be written as class? Why do you have to write your own definition of the class name? (This is consistent with the previous creation object, car c=new car ())

Data type, the variable name equals the initialization value, and any created variable conforms to this format, regardless of the base data type or the reference data type.

A variable of a class type must point to an object, and if it does not point to an object, it has only one value that can be null.

Watching the video carefully, the functional function seems to be the role of modification, rather than the role of creation.

Java-Preliminary Understanding-sixth-class type parameters

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.