(String[] args)
| 27 | |
| 28 | public class RecycleA { |
| 29 | public static void main(String[] args) { |
| 30 | List<Trash> bin = |
| 31 | Stream.generate(SimpleFactory::random) |
| 32 | .limit(10) |
| 33 | .collect(Collectors.toList()); |
| 34 | Bins bins = new Bins(bin); |
| 35 | bins.show(); |
| 36 | } |
| 37 | } |
| 38 | /* Output: |
| 39 | Aluminum weight: 0.34 * price: 1.67 = 0.57 |