static int randomInt() { ret defaultRandomGenerator().nextInt(); } // return value between 0 and n-1 static int randomInt(Random random, int n) { ret random(random, n); }
download show line numbers debug dex
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1024425 |
Snippet name: | randomInt - out of full int range (including negative values) + more syntax |
Eternal ID of this version: | #1024425/6 |
Text MD5: | 397e2c61c12f67a3c786eebade195837 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-06-23 10:21:02 |
Source code size: | 182 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 74 / 104 |
Version history: | 5 change(s) |
Referenced in: | [show references] |
Formerly at http://tinybrain.de/1024425 & http://1024425.tinybrain.de