Re: Arrays.sort(s) caused an error
- From: "Steve W. Jackson" <stevewjackson@xxxxxxxxxxx>
- Date: Tue, 11 Jul 2006 11:23:45 -0500
In article <1152634632.972731.315770@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"niceguy16" <yingjian.ma1955@xxxxxxxxx> wrote:
Hi,
I have this code:
String[] s= {"Mark","Steve","Pete"};
s=Arrays.sort(s);
The 2nd line has an error saying:
incompatible types
found : void
required: java.lang.String[]
s=Arrays.sort(s);
^
1 error
Why?
Thanks.
You didn't check the API for the Arrays.sort method, did you? It
doesn't return anything.
--
Steve W. Jackson
Montgomery, Alabama
.
- Follow-Ups:
- Re: Arrays.sort(s) caused an error
- From: IchBin
- Re: Arrays.sort(s) caused an error
- References:
- Arrays.sort(s) caused an error
- From: niceguy16
- Arrays.sort(s) caused an error
- Prev by Date: Exception handler problem.
- Next by Date: Re: Arrays.sort(s) caused an error
- Previous by thread: Arrays.sort(s) caused an error
- Next by thread: Re: Arrays.sort(s) caused an error
- Index(es):
Relevant Pages
|
|