The error says:
C:\Users\DesktopPrimes.java:13: error: non-static variable out cannot be referenced from a static context
out.close();
^
Notice there's a little caret that even points at it...
Type: Posts; User: GregBrannon
The error says:
C:\Users\DesktopPrimes.java:13: error: non-static variable out cannot be referenced from a static context
out.close();
^
Notice there's a little caret that even points at it...
Threads merged.
There are several algorithms on the 'net that describe how to find prime numbers. Google 'java prime numbers', 'sieve of Eratosthenes', 'euler prime numbers', or similar.