I am just started to learn Java.  My professor has gone  over all our projects so I feel comfortable with the honor code to ask for help in designing this.  Thank you. In Java, Design a program that generates a 7-digit lottery number. The program should have an integer array with 7 elements. Write a loop that steps through the array, randomly generating a number in the range of 0 through 9 for each element of the array. Write another loop that displays the contents of the array.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 11RQ
icon
Related questions
Question

I am just started to learn Java.  My professor has gone  over all our projects so I feel comfortable with the honor code to ask for help in designing this.  Thank you.

In Java, Design a program that generates a 7-digit lottery number. The program should have an integer array with 7 elements. Write a loop that steps through the array, randomly generating a number in the range of 0 through 9 for each element of the array. Write another loop that displays the contents of the array.

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT