aspose file tools*
The moose likes Beginning Java and the fly likes Boolean arrays in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Boolean arrays in java" Watch "Boolean arrays in java" New topic
Author

Boolean arrays in java

Sebastien Zerbato
Greenhorn

Joined: Nov 14, 2011
Posts: 24
Hello, I am coding a program that is using a boolean array to select different values in a interval. All the values are originally set on true, then some values are assigned to false. Is there a way to select all the true values of that array ? I can't find one in the array API in java.
Thanks for your time.
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7643
    
  19

Sebastien Zerbato wrote:Hello, I am coding a program that is using a boolean array to select different values in a interval. All the values are originally set on true, then some values are assigned to false. Is there a way to select all the true values of that array ? I can't find one in the array API in java.

That usually means that there isn't one. You may have more success with java.util.BitSet.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Sebastien Zerbato
Greenhorn

Joined: Nov 14, 2011
Posts: 24
Ok, I will try that, thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Boolean arrays in java