static String makeRandomID(int length) { ret makeRandomID(length, defaultRandomGenerator()); } static String makeRandomID(int length, Random random) { char[] id = new char[length]; for (int i = 0; i < id.length; i++) id[i] = (char) ((int) 'a' + random.nextInt(26)); return new String(id); } sS makeRandomID(Random r, int length) { ret makeRandomID(length, r); }
download show line numbers debug dex old transpilations
Travelled to 23 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, ekrmjmnbrukm, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt, vujiipfktnfq, wnsclhtenguj, xprdwmaupziu, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1000570 |
Snippet name: | makeRandomID(int) |
Eternal ID of this version: | #1000570/3 |
Text MD5: | 542e4aeefab2bed87d8dd429c5521a90 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-12 12:56:46 |
Source code size: | 390 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 786 / 5400 |
Version history: | 2 change(s) |
Referenced in: | #1000869 - randomID #1002427 - Accellerating 629 (SPIKE) #1006654 - Standard functions list 2 (LIVE, continuation of #761) #3000382 - Answer for ferdie (>> t = 1, f = 0) |