I am trying to print out all the elements of a List
, however it is printing the pointer of the Object
rather than the value.
This is my printing code…
for(int i=0;i<list.size();i++){
System.out.println(list.get(i));
}
Could anyone please help me why it isn’t printing the value of the elements.