ArrayList lists = new ArrayList(); Product有四个成员变量要怎么才能使用它们.就是通过lists使用Product的成员变量.

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/01 06:13:24

ArrayList lists = new ArrayList(); Product有四个成员变量要怎么才能使用它们.就是通过lists使用Product的成员变量.
ArrayList lists = new ArrayList(); Product有四个成员变量要怎么才能使用它们.
就是通过lists使用Product的成员变量.

ArrayList lists = new ArrayList(); Product有四个成员变量要怎么才能使用它们.就是通过lists使用Product的成员变量.
lists 是结果集,通过get()获得product对象通过这个对象使用变量
Product product = (Product)lists.get(i);