Learning Essentials:
What is a class set framework
Types of collections
The basic mechanism of the class set framework
What is a class set framework
A class set framework is a set of classes and interfaces
Located in the Java.util bag;
The primary user stores and manages objects;
Divided into three main categories-collections, lists, and mappings
What is a collection (set)
The objects in the collection have no order and no duplicate objects
What are lists (list)
Objects in the collection are sorted by index location and can have duplicate objects
What is mapping (map)
Each element in the collection contains a key object and a value object, the key cannot be duplicated, and the value can be repeated
Import Java.util.list;import java.util.arraylist;interface test{public static void Main (String args[]) {arraylist< string> arrayList = new arraylist<string> () Arraylist.add ("a");//Add Data Arraylist.add ("B"); Arraylist.add ("C" ); Arraylist.remove (1); Delete element ' B ' for (int i = 0; Arraylist.size (); i++) {String s = arraylist.get (1); System.out.println (s);}}}
41. Class set Framework (i)