A . Arraylist Set and properties feature. Count gets the number of elements actually contained in the Arraylist method function description. Add () adds the object to the end of the ArrayList. Clear () removes all elements from the ArrayList. Clone creates a shallow copy of the ArrayList. Contains () determines whether an element is in ArrayList . Indextof () Returns the 0-based index of the first occurrence of a value in the ArrayList or a portion of it. Insert () inserts an element into the ArrayList index and inserts the Lastindextof () at any location Returns the index at which this character last appears. Remove () removes a specific value. RemoveAT () removes the element at the ArrayList index. Sort is sorted in ascending order. Reserve () to flip two. Stack stack: Stack advanced, one assignment, one value, in order. Count removes the number of elements within the collection. Push pushes elements into a collection. Pop The collection of elements is rolled out. Clear Empty Collection
properties and methods. Count goes to the number of elements within the collection. Enqueue () into the queue collection. Dequeue () out of the queue collection. Clear clears the collection four. Hashtable hash Table FIFO First, one assignment, but only together to take a value. Properties and methods. Add (,) adds the key and the element. Remove () removes the element in parentheses. Contains () Determines whether there are bracketed elements in the collection. Count calculation set and number of elements input class number, name, scoreStatic voidMain (string[] args) {ArrayList Al=NewArrayList (); Console. Write ("Please enter the number of classes:"); intn=int . Parse (Console. ReadLine ()); for(intI=0; i<n;i++) {Console. Write ("Please enter section"+ (i+1)+"First Name:"); Al. ADD (string) Console. ReadLine ()); Console. Write ("Please enter section"+ (i+1)+"a result:"); Al. ADD (int . Parse (Console. ReadLine ())); } for(intk=0; k<n*2; k=k+2) {Console. WriteLine (Al[k]+"\ t"+al[k+1]); } Console. ReadLine (); } }}
5.11 Collection and Special Collections