newclass.java

来自「基于netbeans的java桌面应用程序合集」· Java 代码 · 共 40 行

JAVA
40
字号
/*
 * NewClass.java
 *
 * Created on 2007年10月27日, 下午4:04
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.Adam;

import java.util.Random;

/**
 *
 * @author Administrator
 */
public class NewClass {
        public  float seed=0;
    /** Creates a new instance of NewClass */
    public NewClass() {
    }
    public int Seed(int seed){
        Random r=new Random();
        this.seed=seed*10;
        System.out.println("  "+seed);
        return seed;
    }
    public static void main(String[] args) {
        Random r=new Random();
       System.out.println(r.nextInt(100));
       System.out.println(r.nextInt(103));
       System.out.println(r.nextInt(102));
       System.out.println(r.nextInt(101));
    /*   System.out.println(r.hashCode());
       System.out.println(r.nextInt());
       System.out.println(r.nextFloat());*/
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?