Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-14-2008, 05:09 AM
Member
 
Join Date: Nov 2007
Posts: 38
carlos123 is on a distinguished road
random numbers without random class`
Code:
int sec = cal.get(Calendar.SECOND); int sec2 = sec / 3; int sec3 = Math.round(sec2);

ok i got a number 1-20 im gunna use as a seed to generate 10,000 random numbers 1-20. i need a formula to put it through, any suggestions?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-15-2008, 12:12 AM
tim's Avatar
tim tim is offline
Senior Member
 
Join Date: Dec 2007
Location: South Africa
Posts: 334
tim is on a distinguished road
Hello carlos123

If you don't want to use the Random class then try Math.random(). If this is not what you want then your problem is mathematical and not Java related. See this site :Pseudorandom series

Hope this helped.
__________________
If your ship has not come in yet then build a lighthouse.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 01-15-2008, 03:15 AM
Member
 
Join Date: Nov 2007
Posts: 38
carlos123 is on a distinguished road
do you understand what i need to do?
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 01-15-2008, 09:16 AM
tim's Avatar
tim tim is offline
Senior Member
 
Join Date: Dec 2007
Location: South Africa
Posts: 334
tim is on a distinguished road
Quote:
Originally Posted by carlos123
do you understand what i need to do?
I am sorry if my reply did not help, but please try to be patient with me.
__________________
If your ship has not come in yet then build a lighthouse.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 01-17-2008, 11:44 PM
Member
 
Join Date: Nov 2007
Posts: 38
carlos123 is on a distinguished road
Ok, but i still need help, thanks.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
random generation carlos123 New To Java 10 01-09-2008 04:43 AM
random numbers carlos123 New To Java 1 12-22-2007 03:56 AM
random numbers without using java funtions carlos123 New To Java 8 11-16-2007 11:13 AM
generating random numbers in a 5x5 array. acidacid New To Java 3 08-14-2007 04:44 AM
getting a random result gradon New To Java 2 07-19-2007 04:54 PM


All times are GMT +3. The time now is 08:05 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org