Type safety:unchecked cast from Object to ArrayList

Source: Internet
Author: User
It is not safe to show that the conversion of object to ArrayList is not secure.

When compiling, you need to add modifiers to compile correctly (specifically, the modifier). I don't remember. ^_^), otherwise you will be prompted with a warning

Of course, this is only a warning, if the landlord confident that the conversion is not a problem, you can add a note in front of the function
@SuppressWarnings ("uncheck")
This will remove the ugly hint of the warning yellow Line.

But do not encourage this, the landlord should still use a safe type conversion

Type safety:unchecked cast from Object to ArrayList

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.