BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 10-09-2010, 07:50 AM   #1 (permalink)
New Member
 
Join Date: Aug 2010
Model: 8800
PIN: N/A
Carrier: to developing blackberry application
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default To generate the random numbers

Please Login to Remove!

How to print the random number generation sequence in blackberry development . .





by
nanda . .
Offline  
Old 10-09-2010, 09:14 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Did you look at the javadocs?

public class Random
extends Object

An instance of this class is used to generate a stream of pseudorandom numbers. The class uses a 48-bit seed, which is modified using a linear congruential formula. (See Donald Knuth, The Art of Computer Programming, Volume 2, Section 3.2.1.)

If two instances of Random are created with the same seed, and the same sequence of method calls is made for each, they will generate and return identical sequences of numbers. In order to guarantee this property, particular algorithms are specified for the class Random. Java implementations must use all the algorithms shown here for the class Random, for the sake of absolute portability of Java code. However, subclasses of class Random are permitted to use other algorithms, so long as they adhere to the general contracts for all the methods.

The algorithms implemented by class Random use a protected utility method that on each invocation can supply up to 32 pseudorandomly generated bits.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

NEW Samsung SOC-4160 Outdoor Security Camera In Box
$145.0
NEW Samsung SOC-4160 Outdoor Security Camera In Box pictureSamsung Galaxy S7 Easy-Dock Car Mount Holder - Windshield Dashboard Cradle (7)
$17.99
Samsung Galaxy S7 Easy-Dock Car Mount Holder - Windshield Dashboard Cradle (7) pictureLot of 100 1000uf 10v 8 X 12 MM Capacitors Samsung / TV Television Repair
$3.99
Lot of 100 1000uf 10v 8 X 12 MM Capacitors Samsung / TV Television Repair pictureSamsung Digital Visual Presenter SDP-900N
$74.99
Samsung Digital Visual Presenter SDP-900N picture10PCS IC K6X4008C1F-VF70 K6X4008C1F-VF55 TSOP32 SAMSUNG TOP
$29.98
10PCS IC K6X4008C1F-VF70 K6X4008C1F-VF55 TSOP32  SAMSUNG  TOP picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.