Advertisement
Guest User

Untitled

a guest
Jan 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class List{
  4. public static void main(String[] args){
  5. LinkedList<Integer> Numlist = new LinkedList<Integer>();
  6.  
  7. Scanner input = new Scanner(System.in);
  8. for (int i = 0; i < 5; i++){
  9. System.out.println("Enter num in LinkedList: ");
  10. int Num = input.nextInt();
  11. Numlist.add(Num);
  12. System.out.println("LinkedList: " + Numlist+ "\n");
  13. }
  14. System.out.println(Collection.shuffle(Numlist));
  15.  
  16.  
  17. }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement