ArrayList有容量上限嗎?

今天面試遇到這個問題:java 首先先new一個面試 List<Integer> list =new ArrayList<Integer>(); 調用無參構造函數默認初始容量爲10,能夠看到list.size()其底層以下:函數 /** * Returns the number of elements in this list. * * @return the num
相關文章
相關標籤/搜索