Down below you'll see an outtake of my code. I need to sort the getTopBids so that the highest bid comes first and after that the second highest one etc.... How do I do this? Very new to Java - this is my first assignment in school!
   public String getTopBids(){
    StringBuilder topBids = new StringBuilder();
    ArrayList<String> topBidsName = new ArrayList<>();
    ArrayList<Integer> topBidsAmount = new ArrayList<>();
    for(int i = 0; i < 3; i++) {
        String name = "";
        int amount = 0;
        for (Bid bid : this.getBidding()) {
            if(amount < bid.getAmount() && !topBidsAmount.contains(bid.getAmount())) {
                name = bid.getUser().getName();
                amount = bid.getAmount();
            }
        }
        if(amount != 0){
            topBidsName.add(name);
            topBidsAmount.add(amount);
        }
    }
    for (int i = 0; i < topBidsName.size(); i++){
        topBids.append(String.format("%s %d kr", topBidsName.get(i),
            topBidsAmount.get(i)));
        if(i != topBidsName.size()) topBids.append(", ");
    }
    return topBids.toString(); }
}
 
    