In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "what Java containers have". In daily operation, I believe many people have doubts about what problems Java containers have. Xiaobian consulted all kinds of information and sorted out simple and easy operation methods. I hope to help you answer the doubts about "what Java containers have"! Next, please follow the small series to learn together!
1. Container (4): It can be used to store objects or primitive data types, which are objects themselves. The first three containers all implement the Collection interface (so their methods are similar), and their bottom layer is arrays.
2. Generics: If a bottle contains everything, it will take a lot of time to remove it. In this case, introduce generic (E), which is equivalent to a label, specifying that the bottle can only contain beef, and only beef can be taken out of it. For example, MyCollection, where E is a formal parameter (it can have multiple parameters), it can be int or String , depending on what data type is passed in when it is created. (When reporting errors, only force type conversion)
3. Source code: see which classes are called inside this class, layer by layer to see it.
ToString: You can print out objects instead of a string of addresses.
5. Chain:
last=node;//node is the last node
6. Constructors (i.e. construction methods)
1. The name of the constructor must be exactly the same as the class name that defines it,
2. A constructor method call is made with the new operation when an object is created. Constructors initialize objects (assign values to variables of objects). (There can be multiple ways to build it.)
7. Object: To concretize abstractions and implement logic in computer languages.
8. Dichotomy, dividing a set of data into two halves, for example, for 1000 data, less than 500, start from the beginning, more than 500 index data from the end back to find
9. It acts as a marker.
last.next =node;(i.e. last.next points to node) last=node;(marked by this node being the last node), last only serves as a marker. first= Node01;(Let Node01 be the first node,)first= Node02;(Reassign the first node, thus deleting Node01) At this point, the learning of "What are Java containers" is over, hoping to solve everyone's doubts. Theory and practice can better match to help you learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.