java中查询List的属性

public class student{

private int age;

private String name;

private int studNumb;

public int getAge(){

return this.age;

}

public String getName(){

return this.name;

}

public int getStudNumb(){

return this.studNumb;

}

}

List  list;

for(i=0;i

{

System.out.print(list.get(i).getName+list.get(i).getAge+list.get(i).getStudNumb);

}

 

 

 

你可能感兴趣的:(java中查询List的属性)