It's not a secret anymore!
The moose likes Beginning Java and the fly likes Array item selection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

Array item selection

Matt Hall

Joined: Feb 28, 2006
Posts: 24
I want to select members of an array that lie between certain values.

i.e. i have the array

DHand1[0] = 3;
DHand1[1] = 4;
DHand1[2] = 15;
DHand1[3] = 18;
DHand1[4] = 25;
DHand1[5] = 30;
DHand1[6] = 31;
DHand1[7] = 35;
DHand1[8] = 37;
DHand1[9] = 39;
DHand1[10] = 42;
DHand1[11] = 45;
DHand1[12] = 51;
Matt Hall

Joined: Feb 28, 2006
Posts: 24
Ignore this, was an accidental post, the other thread of the same name contains my full question. Admin, feel free to delete this thread.
Stephen Foy
Ranch Hand

Joined: Oct 17, 2005
Posts: 143
if you want to select certain members of an array with certain values, you should go through a for loop.

Hope this helps.

Stephen Foy - Microsoft Application Development Consultant
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Array item selection
jQuery in Action, 3rd edition