There are three ways:
take for example
catalogue
catalogue
=
new
ArrayList();
list.add ...
1.
Faster for array lists,
For the for loop,
Conductor under the condition of size:
Internationalorganizations (same as international organizations)
size
=
list . size();
for(int
I
=
0;
I
& lt
Size;
I
++)
{
list . get(I);
}
2.
The general ergodic pattern of collection classes,
Starting from the very early version,
Iterate with an iterator:
iterator
it
=
list . iterator();
while(it.hasNext())
{
target
object file
=
it . next();
}
3.
Some methods in the new JDK,
But I don't quite understand how it works.
Much like traversal in js:
For (object)
object file
:
List)
{
//
object file
It is a one-time element.
}