Advertisement
CuteDogAteMineFrog

zadanie 18

Jan 25th, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package com.kurs_java;
  7. import java.util.*;
  8. import java.lang.*;
  9. /**
  10. *
  11. * @author Jakub
  12. */
  13. public class zadanie18 {
  14. public static void main(String[] args){
  15. ArrayList<Integer> tablica = new ArrayList<>();
  16. for(int a = 0; a<9; a++){
  17. tablica.add((int)(Math.random()*10+1));
  18. }
  19. Collections.sort(tablica);
  20. Collections.reverse(tablica);
  21. System.out.println(tablica);
  22.  
  23. }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement