Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Jason Perry   on Jan 02 In Java Category.

  
Question Answered By: Corey Jones   on Jan 02

There are two ways that come to mind.

One is to put the numbers in an array then call
Arrays.sort on this array. The element at offset 0
(the first elemnt in the array will be the smallest.

The other is to loop through all the numbers holding
the current smallest number in a temporary variable.
If the current number is smaller than the temporary
assign its valule to the temporary variable.

The code for both are quite simple  so I will not post
it here but asy so if you need it and I'm sure
somebody on this list(including myself) can give you
the code.

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Simple but Brain eating Or get search suggestion and latest updates.


Tagged: