Java-preliminary Understanding-Common object API (common method of collection framework-list collection)

Source: Internet
Author: User

One.

Now focus on learning List,list is collection sub-interface, then collection method, list all have, common method does not tell.

Describe the methods that are unique to the list, and the commonality of these unique methods is that they can be manipulated diagonally.

(These are all the methods in the list, which I think are based on the angle of the action element.)

1. Add

The first method in the collection is the addition of the parent class, and the second method is unique to the other. Inserts an element or a bunch of elements given a position of a corner mark.

The method in is to take the element according to the position. Once you have a corner mark, you can precisely position it.

In this delete method, what is the object that is returned? is the element on the specified corner mark deleted? Or the rest of the collection.

In the modified method, the returned object refers to the modified meta-count, which is the element on the original angular position.

The Sublist method contains a header that does not contain a tail.

Two.

The next step is to demonstrate the methods discussed above,

When importing a list package, the list has the name in different packages in Java, and the java.awt package or Java.util package has a list. If the window comes out and returns directly, the java.awt package is imported. In the continuation, the method of invocation is not seen.

which element is deleted and which element is returned. Remove can change the length. In order to know more clearly, the light knows to delete a certain corner mark, but also to return let us know what the deleted element is. If you delete the element directly, you can return the Boolean type of data.

The list collection is a collection of elements, additions and deletions that are supported. Only it can have, collection have no modification.

The DOS result is the return ABC2, the one that was modified.

That is, the corner label is out of bounds, it is neither an array nor a string.

The result does not contain the beginning, only the trailer.

Java-preliminary Understanding-Common object API (common method of collection framework-list collection)

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.