Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package wpatwokeygen;
- import java.util.Random;
- /* Netbeans is being bitchy about this */
- //static import System.out;
- /**
- *
- * @author Christopher
- */
- public class Main {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- Random gen = new Random();
- int num;
- for(int x = 0; x < 64; x++) {
- num = gen.nextInt(16);
- if(num >= 10) {
- switch(num) {
- case 10:
- System.out.print("a");
- break;
- case 11:
- System.out.print("b");
- break;
- case 12:
- System.out.print("c")
- break;
- case 13:
- System.out.print("d")
- break;
- case 14:
- System.out.print("e");
- break;
- case 15:
- System.out.print("f");
- break;
- } // Switch
- } else {
- System.out.print(num);
- }
- } // For
- System.out.println();
- } // Main
- } // Class
Add Comment
Please, Sign In to add comment