Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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 8 API documentation
It is sorta covered in the
JavaRanch Style Guide
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-2015