• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in JAVA by
Q:
Given,

ArrayList list = new ArrayList();  

What is the initial quantity of the ArrayList list?

a) 5

b) 10

c) 0

d) 100

1 Answer

0 votes
by

(b) 10

Reason: The initial or default quantity of an ArrayList is 10. It means when we create an ArrayList without specifying any quantity, it will be created with the default capacity, i.e., 10. Hence, an ArrayList with the default capacity can hold ten (10) values.

Related questions

0 votes
asked Apr 10 in JAVA by Robindeniel
0 votes
asked Apr 9 in JAVA by Robindeniel
...