| 6 | * ��ArrayList�洢�Զ����������Ҫ����뷺�ͣ�����ʹ�����ַ�ʽ |
| 7 | */ |
| 8 | public class ArrayListTest { |
| 9 | public static void main(String[] args) { |
| 10 | // �������϶��� |
| 11 | ArrayList<Student> array = new ArrayList<Student>(); |
| 12 | |
| 13 | // ����Ԫ�� |
| 14 | Student s1 = new Student("����", 18); |
| 15 | Student s2 = new Student("١���", 20); |
| 16 | Student s3 = new Student("����", 19); |
| 17 | Student s4 = new Student("������", 21); |
| 18 | |
| 19 | // ����Ԫ�� |
| 20 | array.add(s1); |
| 21 | array.add(s2); |
| 22 | array.add(s3); |
| 23 | array.add(s4); |
| 24 | |
| 25 | for (Student s : array) { |
| 26 | System.out.println(s.getName() + "---" + s.getAge()); |
| 27 | } |
| 28 | } |
| 29 | } |
nothing calls this directly
no outgoing calls
no test coverage detected