Click to See Complete Forum and Search --> : Primes.class Java Tutorial on WebDeveloper


mfocardi
02-03-2003, 11:48 AM
I believe the Primes.class tutorial/example has a bug since it doesn't compile. (!) This is on the WebDeveloper tutorial site and is written by Mark Reynolds (he has a dead e-mail link). Here is the problem - there is an error at statement 32: cnt; Error generated is 'not a statement'. As you may guess, I am new to java. Can anyone help since the original developer has a dead e-mail link? thanks.

29: while ( cnt > 0 ) {
30: if ( isPrime(sta) ) {
31: arr[idx++] = sta;
32: cnt; // the problem is here on this line
33: }
34: sta++;
35: }