1import java.util.ArrayList;
2public class test {
3 private numbers number;
4
5 //example
6 public test() {
7 number = new numbers();
8 List<Integer> list = number.getList();
9 //hurray !
10 }
11}
12
1import java.util.ArrayList;
2public class numbers {
3 private int number1 = 50;
4 private int number2 = 100;
5 private List<Integer> list;
6
7 public numbers() {
8 list = new ArrayList<Integer>();
9 list.add(number1);
10 list.add(number2);
11 }
12
13 public List<Integer> getList() {
14 return list;
15 }
16}
17