Reading (for next class): PLP, Section 8.4 until the beginning of 8.4.2, and Chapter 13 until the beginning of 13.2.
The file Primes.java is supposed to print out all the prime numbers less than 100. It is your starter code for this homework.
This homework is to be submitted electronically, in a folder
called class23
. You should just submit the single file
Primes.java
.
next()
and hasNext()
methods in the PIter
class so that it returns successive
prime numbers.main
as a for-each loop instead
of a while loop with an explicit iterator.