Click to See Complete Forum and Search --> : Boolean Array...need help with this one part


Ennis
11-13-2004, 10:22 AM
I have to set up a boolean array, which has 10 elements (which are numbers representing seats in a plane). They all have to be initialized to false at the beginning...anyone know how to do this?

ray326
11-13-2004, 05:50 PM
boolean[] b = {false,false,...,false};

Ennis
11-13-2004, 06:08 PM
Originally posted by ray326
boolean[] b = {false,false,...,false};

this is going to work as my array??

russell
11-13-2004, 06:34 PM
Ennis, are we doing your "homework" for you? what Ray posted for you is correct. The dots he put in there was because he didn't feel like typing false 10 times.

Ennis
11-13-2004, 10:42 PM
Originally posted by russell
Ennis, are we doing your "homework" for you? what Ray posted for you is correct. The dots he put in there was because he didn't feel like typing false 10 times.

no you aren't doing my homework for me. I asked for assistance in a part that i didn't understand, cause we never used boolean arrays, we only used string or int arrays up to this point.

ray326
11-13-2004, 11:32 PM
Originally posted by Ennis
this is going to work as my array??
Yep, your array of booleans will be called b.

Ennis
11-13-2004, 11:48 PM
tanks for yer help everyone