how does capacity is calculated? | Sololearn: Learn to code for FREE!

0

how does capacity is calculated?

2/14/2017 4:59:18 PM

Adzreel Zeequanil Martadam

2 Answers

New Answer

+3

Which capacity? Publish your code at the playground, then we can try to help you.

0

StringBuffer sbl = new StringBuffer ("Capacity of sb"); System.out.println(sbl.capacity ()); OUTPUT IS 30 capacity of sbl = 14 initial memory allocated = 16 my question is how does the java calculated the capacity?