In java.util.Arrays there is a private static class called "ArrayList" defined.
It is only referred from Arrays.asList method.
What is the benifit of doing this?
Why is java.util.ArrayList not referred instead?
Code below:
/**
* @serial include
*/
private static class ArrayList<E> extends AbstractList<E>
implements RandomAccess, java.io.Serializable
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…