I'm trying to create a sieve (prime sieve). A nice quick simple one using boolean expressions.(adsbygoogle = window.adsbygoogle || []).push({});

I remember on Visual Basics it began by creating like X number of boolean variables and then sieve them out by classifying them as false... and so on.

How to a create a large group of boolean variables?

I think it was something like p(i) and i=X, which X determined how many to create. It was something like this I think.

So, technically i is like a variable itselt because when I go through the loop, I should be able to go through steps like...

p(4) = false;

p(6) = false;

p(8) = false;

... all the way until I reach 2X.

So, how do you create this variable?

Thanks, I appreciate it.

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Java Question

**Physics Forums | Science Articles, Homework Help, Discussion**