Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

help with arrays

  Asked By: Meenachi    Date: Mar 13    Category: Java    Views: 753
  

If you find the minimum value in an array of
doubles, and then later go back into the array to find the
next lowest value,,, how would you set the previous
minimum so that it won't be found as the minimum
value?..Maybe set it to a value that could never be minimum?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Jean Bell     Answered On: Mar 13

There is a neat class
java.util.Arrays.Look in there. You can use it to sort an array. Then,
you don't have to look for minimum values. You just
go down the array  sequentially.If you need
to keep the array pristine, just use the Arrays
class to copy one array to another then sort the new
array....There are ways to do what you want with neat coding,
but using the java API's and having THEM do the work
is what the "lazy" programmer does.Stephen
McConnellhttp://www.crosslogic.com

 
Didn't find what you were looking for? Find more on help with arrays Or get search suggestion and latest updates.




Tagged: