Java tutorial
//package com.java2s; public class Main { public static int getMyId() { int id = (int) (Math.random() * 1000000); return id; } }