Write a public int method named initialNumberOfSticks which takes two int parameters named max_sticks and min_sticks and returns a random integer value between max_sticks and min_sticks (inclusive). You will create a new instance of the Random class and call it r. Use the nextInt method of r to a get random value within a desired range and use it to compute the value that will be returned. Your method must be a syntactically correct Java method.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 7E
icon
Related questions
Question

Write a public int method named initialNumberOfSticks which takes two int parameters named max_sticks and min_sticks and returns a random integer value between max_sticks and min_sticks (inclusive). You will create a new instance of the Random class and call it r. Use the nextInt method of r to a get random value within a desired range and use it to compute the value that will be returned. Your method must be a syntactically correct Java method.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,