Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
494 views
in Technique[技术] by (71.8m points)

java - What is the difference between ArrayList al = new ArrayList(); and ArrayList al = new ArrayList(0)?

What is the difference between ArrayList al = new ArrayList(); and ArrayList al = new ArrayList(0)?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
ArrayList(0) 

Empty list with the specified initial capacity. Hense none for 0

ArrayList() 

Empty list with an initial capacity of ten.

Please read the following: http://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...