Let suppose that i create ArrayBuffer with initial size equal 10
val buf = new ArrayBuffer[Int](10)
If i did call to method buf.size – got the size of buffer equal 0?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, because
size(in this case inherited fromIndexedSeq) refers to the number of elements in a collection, not the size or length of the underlying data structure.