import java.util.Random;
System.out.println("***** Generating Random Number of 4 digit *****");
Random random = new Random();
for(int i=0;i<100;i++){
long fraction = (long)(1000 * random.nextDouble());
int PIN= (int)(fraction + 1000);
System.out.println(PIN);
}
how can I generate unique 4 digits random no in jana.
ReplyDelete