Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4617376
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:06:57+00:00 2026-05-22T02:06:57+00:00

How does the seed value passed to Java’s random number generator effect its output?

  • 0

How does the seed value passed to Java’s random number generator effect its output? How would i go about figuring out which numbers it will output if i know the seed value?

Also are some seed values better than others at producing more psudo-randomness than others?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:06:58+00:00Added an answer on May 22, 2026 at 2:06 am

    You cannot generate truly random numbers in software, because software is deterministic: given some input, it will in principle always generate a predictable output.

    So, to get random numbers, a number of algorithms have been invented that generate sequences of numbers that look random (but are not really – that’s why they are called pseudo-random numbers).

    Such an algorithm starts with some start value, the seed, and then does some calculations with it to generate the next pseudo-random number.

    If the algorithm is any good, then there should be no difference in seed values: one seed value should not be better than any other in generating random numbers.

    Often, the current time is taken as the seed value, so that each time you generate a sequence of numbers, you get a different sequence. Note that if you use the same seed value, you will get the same sequence of pseudo-random numbers each time you run it.

    If you use pseudo-random numbers for cryptographic purposes, you should be very careful, because if an attacker knows the seed value then he can re-generate the sequence of random numbers which might compromise the security of your system. For really secure systems, people use special hardware-based random number generators, which can generate truly random numbers. Java has a class java.security.SecureRandom to interface with such systems.

    See Random number generation on Wikipedia for a lot more detail and information on different algorithms.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement a lagged Fibonacci pseudo-random number generator for integers up to
How does the value produced by rand function depends on it seed value.When we
Does the Java language have delegate features, similar to how C# has support for
Does anyone know how to transform a enum value to a human readable value?
Does SQLite support seeding the RANDOM() function the same way MySQL does with RAND()
I want to repeat a random number sequence generated by a legacy software using
Is it possible to override the seed value when creating a new table using
I must generate a random number using boost libraries, I use this code: boost::mt19937
Does Google force employees who have offers from Facebook to leave immediately?
Does anyone remember the XMP tag? What was it used for and why was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.