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

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -