boolean array
Is there a way to get this down to one line of code?
boolean [] myArrary = {true, false};
return myArrary;
I'm trying to combine those lines into one, but I am not sure what the correct syntax would be.
Thanks, sj
Sailor_Jerry
Junior Poster in Training
88 posts since Aug 2005
Reputation Points: 13
Solved Threads: 2
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
the syntax you're looking for is:
return new boolean[] {true, false};
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
ahh thanks. I didn't have the "new" keyword
Sailor_Jerry
Junior Poster in Training
88 posts since Aug 2005
Reputation Points: 13
Solved Threads: 2