5 pts.
 Java codes
How to create a program in java that will display a lowest and highest number?

Software/Hardware used:
ASKED: March 16, 2009  2:32 PM
UPDATED: September 3, 2011  3:53 PM

Answer Wiki:
Thers an alternate way to do this would be to store all those numbers into an array, then sort the array and gets the first and last element(It uses java.util package): arr_nums // integer array of 100 numbers java.util.Arrays.sort(arr_nums); System.out.println("The lowest number is " + arr_nums[0]); System.out.println("The biggest number is " + arr_nums[arr_nums.length-1]);
Last Wiki Answer Submitted:  January 25, 2010  11:30 am  by  Karl Gechlik   9,815 pts.
All Answer Wiki Contributors:  Karl Gechlik   9,815 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

You should try to solve it by yourself.
If you are not able to do it or you have some specific doubt/problem, post what you have done so far, and we will try to help you.

 63,535 pts.

 

first sort the array list and get the first element as smallest and the last element in the array is greatest number which is in java.util package of class Arrays.sort(arr_nums);
System.out.println(“The lowest number is ” + arr_nums[0]);
System.out.println(“The biggest number is ” + arr_nums[arr_nums.length-1]);

 655 pts.