I am new to java and need help to understand following behavior I tried today.
I have a class variable defined like:
private static LinkedList<Integer> queue = new LinkedList<Integer>();
In Constructor I am adding some elemets as following:
While in main its shows LinkedList as empty. So my question is why adding elements in constructor is not working for me.
Thanks in advance