Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. package hw5;
  2.  
  3. import java.util.*;
  4.  
  5. public class QueueTime {
  6. static int n;
  7. static int s;
  8. static Random gen;
  9. static Queue<String> q = new LinkedList<String>();
  10. static poorQueue pq = new poorQueue();
  11. long start = System.nanoTime();
  12.  
  13. public static void main(String[] args) {
  14. if (args.length == 0) {
  15. n = 1000;
  16. s = 111;
  17. } else if (args.length == 1) {
  18. n = Integer.parseInt(args[0]);
  19. s = 111;
  20. } else if (args.length == 2) {
  21. n = Integer.parseInt(args[0]);
  22. s = Integer.parseInt(args[0]);
  23. }
  24. gen = new Random(s);
  25. for (int i = 0; i < n; i++){
  26. pq.enqueue(""+n);
  27. q.
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement