class Test {
List<Integer> list;
Test(){
list = new ArrayList<Integer>();
someVoid(list);
}
void someVoid(List<Integer> l){
l.add(0);
l=null;
}
public static void main(String[] args) {
Test test=new Test();
System.out.println("Size is: "+test.list.size());
}
}
Login in to like
Login in to comment