need help on arrays please

R

Roy J

Hello everyone:)
My name is Roy, I am new to Java and I have problem regarding to arrays.
if you have time and like to help, please help.

I am trying to make a program to deal with prime numbers, but I do not how
to involve arrays with that.

program generates prime numbers according to user input, and displays them
in descending order. The user enters the number of prime numbers to be
generated. The output is displayed 5 numbers per row, 20 rows per screen.
If there are more than 100 numbers, the output should wait for the user to
press <Enter> before continuing to the next page. The program should repeat
until the user chooses to quit.

The "primelist" data structure must be implemented as a class with a private
array and a private counter for the number of elements. The class should
include methods to fill the array, display the array, etc.. The method to
test a number for "primeness" be a private method.

my quetion regarding the array stuff, how i can create a method to fill
array 5 number each row and display them in screen with display method?

thanks alot
waiting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top