Wednesday, 7 August 2013

Access the value from list in java

Access the value from list in java

this is one of my class
class number11 {
String ab;
int i;
public number11(String ab,int i) {
this.ab=ab;
this.i=i;
}
}
And in main method, I used
List<number11> n1= new ArrayList<number11>();
How can I access the value of integers and String contained in List? I do
wish just to print them but to use further.

No comments:

Post a Comment