Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. // Create a Random instance that will generate random numbers
  2. Random rand = new Random();
  3. // Create the Deque which in this case is an instance of LinkedList
  4. ArrayList<Integer> list = new ArrayList<>();
  5. // Push 10 random integers into the list.
  6. for (int i = 0; i < 10; i++)
  7. {
  8. list.add(rand.nextInt(10));
  9. }
  10. // Print the full array so we know the values
  11. System.out.println(list.toString());
  12. // Start here...
  13. Deque<Integer> deque = new LinkedList<>();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement