Skip to content

Creating a new instance of Random every time the method is called can be inefficient. Consider creating a private instance variable for Random and reusing it. #1582

@StoneBlood-bit

Description

@StoneBlood-bit
          Creating a new instance of `Random` every time the method is called can be inefficient. Consider creating a private instance variable for `Random` and reusing it.

Originally posted by @mateacademy-ai-mentor in #1580 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions