Hello friends ,
I want to create an array , which need to store randomly generated numbers in the range of 5483-400000 ,
 Can anyone provide me with the java code?
I need some help with java
Hello Emerald,
I would like to start by telling you about the Random utility of Java, All you got to do is import it and create a function. Here is a sample part code that randomly generate numbers 5483 to 400000 and directly stored in an array..
Â
import java.util.Random;
public final class number {
Â
 public static final void main(String… aArgs){
  log("Generating 10 random integers in range 5483..400000.");
int min = 5483;
int max = 400000;
Â
  Random random = new Random();
  for (int i = 1; i <= 10; ++i){
   //Generate a random number from 5483  to 400000
int randomNumber = random.nextInt(max – min) + min;
Â
   log("Generated : " + randomNumber);
  }
Â
  log("Done.");
 }
Â
 private static void log(String aMessage){
  System.out.println(aMessage);
 }
}
Â
Hope it help you, have a good day!..