Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.io.IOException;
- import java.util.Collections;
- import java.util.List;
- public class Main {
- public static void main(String[] args) throws IOException {
- FileWork fileWork = new FileWork();
- List<Automobilis> cars = fileWork.gatherCars();
- for (int i = 0; i < cars.size() ; i++) {
- System.out.println(cars.get(i).toString());
- }
- Collections.sort(cars, (a, b) -> b.compareTo(a));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement