arraylist - Java lists strange size malfunction -


this question has answer here:

i initialize list, this:

public list<edge> edges = new arraylist<edge>(8); 

after that, size, following code gives zero.

system.out.println("size: " + edges.size()); 

there isn't value change or method call beetwen 2 lines. can causes this?

the parameter constructor capacity.

the capacity number of elements underlying array can hold before needs resizing.


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

Bubble Sort Manually a Linked List in Java -

asp.net mvc - SSO between MVCForum and Umbraco7 -