NumberedGeneration.java 947 Bytes
Newer Older
yuquan.zhu committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
package cn.timer.api.utils;

import java.text.SimpleDateFormat;
/**
 * 随机数生成
 * @author Administrator
 */
public class NumberedGeneration {
	
	 public static Integer test(int l) {
		  String str = new SimpleDateFormat("yy-mm-dd")
		    .format(new java.util.Date());
		  long m = Long.parseLong((str));
		  Integer ret = (int) (m + l);
		  long  n = l + 1;
16
		  System.out.println(n);
yuquan.zhu committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
		  return ret+1000;
	}
	 
	public static Integer six() {
		
		 Integer ret =(int)((Math.random()*9+1)*100000);
		      
		return ret;
	}
	public static Integer eight() {
		
		Integer ret =(int)((Math.random()*9+1)*10000000);
		
		return ret;
	}
	
	public static Integer nine() {
		
		Integer ret =(int)((Math.random()*9+1)*100000000);
		
		return ret;
	}
	 public static Integer test2() {
		 Integer ret =  (int) (Math.random()*9000+1000);
		  return ret;
	 }
	 
	 
	 public static void main(String[] args) {
		
		 //System.out.println(six());
	 }  
}