I have a class:
sample.java
class sample
int val;
String str;
constructor
sample(String str,int val)
str=this.str;
val=this.val
test.java
ArrayList<sample> lst=new ArrayList<sample>();
lst.add(new sample("somedata",33)):
lst.add(new sample("somedata",33)):
send(lst) sending arraylist obj over a network.but i was wondering how i can print the values in the arraylist. I tried using iterator but it is only showing object references.