Guest User

Untitled

a guest
Nov 23rd, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5.  
  6. package wpatwokeygen;
  7.  
  8. import java.util.Random;
  9. /* Netbeans is being bitchy about this */
  10. //static import System.out;
  11.  
  12. /**
  13. *
  14. * @author Christopher
  15. */
  16. public class Main {
  17.  
  18. /**
  19. * @param args the command line arguments
  20. */
  21. public static void main(String[] args) {
  22. Random gen = new Random();
  23. int num;
  24. for(int x = 0; x < 64; x++) {
  25. num = gen.nextInt(16);
  26. if(num >= 10) {
  27. switch(num) {
  28. case 10:
  29. System.out.print("a");
  30. break;
  31. case 11:
  32. System.out.print("b");
  33. break;
  34. case 12:
  35. System.out.print("c")
  36. break;
  37. case 13:
  38. System.out.print("d")
  39. break;
  40. case 14:
  41. System.out.print("e");
  42. break;
  43. case 15:
  44. System.out.print("f");
  45. break;
  46. } // Switch
  47. } else {
  48. System.out.print(num);
  49. }
  50. } // For
  51. System.out.println();
  52. } // Main
  53. } // Class
Add Comment
Please, Sign In to add comment