Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Java only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
Java
Create 50 element boolean array, set first 25 elements true, rest false
Create 50 element boolean array, set first 25 elements true, rest false
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Mary Seelye
New Member
Join Date:
Oct 2010
Posts:
14
#1
Create 50 element boolean array, set first 25 elements true, rest false
Nov 22 '10, 11:19 PM
I don't even know where to start with this or figure out how to get them to display. I need the first 25 to be true and the last 25 to be false.
I need all the trues and falses to display.
Dheeraj Joshi
Recognized Expert
Top Contributor
Join Date:
Jul 2009
Posts:
1129
#2
Nov 23 '10, 03:26 AM
I guess you don't have a code for this. Follow this algorithm.
1)Take a boolean array of size 50
2)Loop through first 25 elements of the array and set the value to TRUE.
3)Continue looping for next 25 elements and set the value to FALSE.
Regards
Dheeraj Joshi
Last edited by
Dormilich
;
Nov 23 '10, 06:44 AM
.
Comment
Post
Cancel
Mary Seelye
New Member
Join Date:
Oct 2010
Posts:
14
#3
Nov 23 '10, 04:02 AM
thank you!
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment