Skip to content

Instantly share code, notes, and snippets.

@RashidJorvee
Created January 7, 2019 04:34
Show Gist options
  • Save RashidJorvee/18f768cc38fcbbae7fd77a9a07a068e6 to your computer and use it in GitHub Desktop.
Save RashidJorvee/18f768cc38fcbbae7fd77a9a07a068e6 to your computer and use it in GitHub Desktop.
How to generate three digits random number in java
package rashid.jorvee;
import java.lang.Math;
import java.util.ArrayList;
import java.util.Collections;
public class GenerateThreeDigitsRandomNumber {
public static void main(String[] args) {
int random = (int )(Math.random()* 900 + 000);
System.out.println(random);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment