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 4622578
In Process

The Archive Base Latest Questions

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

I am creating a deep clone for some object. The object contains a Random

  • 0

I am creating a deep clone for some object. The object contains a Random.

Is it good practice to retrieve the seed from the Random? If so, how? There isn’t a Random.getSeed().

  • 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:51:48+00:00Added an answer on May 22, 2026 at 2:51 am

    A Random is intended to be random. Usually you want two Random to produce different numbers rather than to produce the same numbers.

    You can copy a Random using serialisation/de-serialisation and get the “seed” field using reflection. (But I doubt you should be doing either)

    Unless the sequence is critical to you, you can take the view that the clone of a Random is itself or any new Random()

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

Sidebar

Related Questions

I have been creating object for a project and there are some instances that
Before I get too deep in creating this, is there a library out there
I did some searching found some different methods and posts about creating a deep
When creating a web application, and lets say you have a User object denoting
I read some articles about Application Domain.The deep reading finally resulted in whirling confusion.So
The following code works. However, it works because I end up creating a deep
What are the deep technical details behind creating and using correctly custom exceptions? I
I am creating a huge Array in javascript...It's 4 levels deep and many elements
I'm dealing with OpenCV and have some memory management questions from their DFT example
Which would you recommend - a deep objects hierarchy (where each object hold a

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.