my dog learned polymorphism*
The moose likes Applets and the fly likes To get Maximum and minimum value from an array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "To get Maximum and minimum value from an array" Watch "To get Maximum and minimum value from an array" New topic
Author

To get Maximum and minimum value from an array

Aayush Patel
Greenhorn

Joined: Apr 26, 2001
Posts: 21
Can anybody help me for finding maximum value and minimum value from an array of double values..i mean suppose there is an array of double values and now i want to find max and min value then is there any readymade method in double class or we have to define with our own...
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Well, there is a method in the Math class that returns the max of two double values... so to get the max of an array of doubles, you would have to do something like this...



HTH,
-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
jQuery in Action, 2nd edition
 
subject: To get Maximum and minimum value from an array
 
Similar Threads
caluculating sum of all the numbers in a String
second maximum value from the array
max value of an array
An odd question...
SiMpLe Program but......I still beginner