1. Main differences between array and arraylist:
1) you can think of arraylist as an "array that automatically expands the capacity ".
2) array ([]): it is the most efficient, but its capacity is fixed and cannot be changed dynamically;
Arraylist: The capacity can be dynamically increased, but the efficiency is sacrificed;
3) Based on the efficiency and type test, array should be used as much as possible. arraylist is used only when the array size cannot be determined!
2. Convert object [] array. toarray () to string []
The array is also of the object type and cannot be converted forcibly.
String [] array = new string [O. Length];
For (INT I = 0; I <O. length; I ++)
{
Array [I] = O [I]. tostring ();
}
3. Synchronized Method:
The Declaration is to define the scope and scope of the variable.
The synchronized method is declared by adding the synchronized keyword to the method declaration. For example:
Public synchronized void accessval (INT newval );