Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Please help me to do this exercise

843789Apr 12 2009 — edited May 12 2009
Create isPrimeNumber method to show n prime numbers.
Example:
A call to showPrimeNumbers(4) will return 2 3 5 7

We should use If, loop and method only in this exercise.
I got confused at how to use a variable n (Scanner object) to limit the number of Prime numbers

Thax you for your helps
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 9 2009
Added on Apr 12 2009
28 comments
469 views