🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #26532

Re: Random

#26532
From: Jonathan Revusky
Date: Thu, 24 Dec 1998 00:00
17 lines
964 bytes

OSCURO wrote:
> 
>     �Como se puede generar un n�mero aleatorio definiendo el n�mero m�nimo y
> el m�ximo en el entorno de Java (como entre 1 y 1000) ?
> 
>     Gracias, Oriol Ventura.

int randomint = (int) Math.round(1+Math.random()*1000);

Jonathan Revusky
-- 
Java and Delphi Consulting
Make your .class files double-clickable
with SmartJ
http://www.bigfoot.com/~crystalline.solutions
Technical Details
Message-ID: <36821859.419AE85B@jet.es>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <75rjmd$e9k@wendy.mad.servicom.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: 1116f3,3cbc411a756deed7
X-Google-Attributes: gid1116f3,public
From: Jonathan Revusky <jrevusky@jet.es>
Subject: Re: Random
Date: 1998/12/24
Message-ID: <36821859.419AE85B@jet.es>
X-Deja-AN: 425470643
Content-Transfer-Encoding: 8bit
References: <75rjmd$e9k@wendy.mad.servicom.es>
X-Accept-Language: en
Content-Type: text/plain; charset=iso-8859-1
Organization: Telefonica Transmision de Datos
Mime-Version: 1.0
Reply-To: jrevusky@bigfoot.com
Newsgroups: es.comp.lenguajes.java