Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class List{
- public static void main(String[] args){
- LinkedList<Integer> Numlist = new LinkedList<Integer>();
- Scanner input = new Scanner(System.in);
- for (int i = 0; i < 5; i++){
- System.out.println("Enter num in LinkedList: ");
- int Num = input.nextInt();
- Numlist.add(Num);
- System.out.println("LinkedList: " + Numlist+ "\n");
- }
- System.out.println(Collection.shuffle(Numlist));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement