But, fortunately i still save some data... Praise my Lord...
So, here is my program for generate a random value in java programing. i'll use an printscreen of my program and it's output.
and it's outputs for every running program is always difference because it's randoms behavior. like this :
second running
third running
so, if you want to generate a random value on java programing :
- import java.util.*;
- make an object from class Random :
Random random = new Random() ;
- and the syntax is :
individu[i][0][index]=random.nextInt(100);
means that generate an integer random value between 0 and 100.
1 comments:
bagus blog nya,..
'kita tahu ada masalah,
kita tahu solusinya seperti apa.
Maka seharusnya kita berani berjuang dengan idealisme kita. Persetan dengan yang namanya realita'
Anonymous
( Someone at world wide web )
Post a Comment