Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.14 KB | None | 0 0
  1.         public String getCharacterNameGenerated()
  2.         {
  3.         String Voyelles = "aeiouy";
  4.     String Consonnes = "bcdfghjklmnpqrstvwxz";
  5.         String NameGenerated = "";    
  6.         int lower = 0;
  7.         int higher = 2;
  8.         int random = (int)(Math.random() * (higher-lower)) + lower;
  9.         int i = (int)Math.floor(Math.random() * 20);
  10.         NameGenerated += Consonnes.toUpperCase().charAt(i);
  11.         i = (int)Math.floor(Math.random() * 6);
  12.     NameGenerated += Voyelles.charAt(i);
  13.         i = (int)Math.floor(Math.random() * 6);
  14.     NameGenerated += Voyelles.charAt(i);
  15.         i = (int)Math.floor(Math.random() * 20);
  16.     NameGenerated += Consonnes.charAt(i);
  17.         i = (int)Math.floor(Math.random() * 20);
  18.     NameGenerated += Consonnes.charAt(i);
  19.         i = (int)Math.floor(Math.random() * 6);
  20.     NameGenerated += Voyelles.charAt(i);
  21.     if (random >= 1)
  22.             {
  23.             i = (int)Math.floor(Math.random() * 20);
  24.             NameGenerated += Consonnes.charAt(i);
  25.             i = (int)Math.floor(Math.random() * 6);
  26.             NameGenerated += Voyelles.charAt(i);
  27.             }
  28.  
  29.         return "APK" +NameGenerated;
  30.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement