A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
help anda what is the package for the sort()
Joined: Oct 13, 2005
Oct 13, 2005 08:07:00
Is the sort() meth. inside the java.util.*; ??
Im trying to sort the numbers from the lowest to the highest
System.out.print( Insert an int: );
int [ ] numbers = new int 
// Array.sort(numbers); <--- is that correct?
Jesper de Jong
Joined: Aug 16, 2005
Oct 13, 2005 08:46:00
> // Array.sort(numbers); <--- is that correct?
No, it should be Arrays.sort(numbers) (note, Array
, not Array).
And class Arrays is indeed in package java.util.
Java Beginners FAQ
JavaRanch SCJP FAQ
The Java Tutorial
Java SE 7 API documentation
- My blog about Scala
I agree. Here's the link:
subject: help anda what is the package for the sort()
am i missing something?
generating numbers from 1 to 100 to store in an array
Searching an array - output problems - Please help!!
java.lang.ArrayIndexOutOfBoundsException - null
Output of array only on one line - any ideas why?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014