Tag Archives: random

7,674 views

Random number Java

Generate random number Android Java example source code. Random rand = new Random(); int i = rand.nextInt() % 256; // range -255 +255 System.out.print(i + "\n"); // -184 i = Math.abs(rand.nextInt() % 12); // range 0 +11 System.out.print(i); // 7 … Continue reading

Posted in Android Examples Code, Array,List,Collections | Tagged , , , , | Comments Off on Random number Java