0
how does capacity is calculated?
2 Respostas
+ 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?