This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Boolean arrays in java

 
Sebastien Zerbato
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10417
63
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sebastien Zerbato
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I will try that, thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic