Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String getCharacterNameGenerated()
- {
- String Voyelles = "aeiouy";
- String Consonnes = "bcdfghjklmnpqrstvwxz";
- String NameGenerated = "";
- int lower = 0;
- int higher = 2;
- int random = (int)(Math.random() * (higher-lower)) + lower;
- int i = (int)Math.floor(Math.random() * 20);
- NameGenerated += Consonnes.toUpperCase().charAt(i);
- i = (int)Math.floor(Math.random() * 6);
- NameGenerated += Voyelles.charAt(i);
- i = (int)Math.floor(Math.random() * 6);
- NameGenerated += Voyelles.charAt(i);
- i = (int)Math.floor(Math.random() * 20);
- NameGenerated += Consonnes.charAt(i);
- i = (int)Math.floor(Math.random() * 20);
- NameGenerated += Consonnes.charAt(i);
- i = (int)Math.floor(Math.random() * 6);
- NameGenerated += Voyelles.charAt(i);
- if (random >= 1)
- {
- i = (int)Math.floor(Math.random() * 20);
- NameGenerated += Consonnes.charAt(i);
- i = (int)Math.floor(Math.random() * 6);
- NameGenerated += Voyelles.charAt(i);
- }
- return "APK" +NameGenerated;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement