Le 12 janv. 11 à 01:23, Rene Olgers a écrit :

Thanks Michele,

I have solved it and it works!
My pleasure.
Please, reply to the group so that they know you have solved it.

Michèle Garoche


René

> Date: Tue, 11 Jan 2011 10:29:27 -0800
> Subject: [java programming] Re: array split
> From: migat...@gmail.com
> To: javaprogrammingwithpassion@googlegroups.com
>
>
>
> On Jan 11, 5:10 pm, Rene Olgers <ollie1...@gmail.com> wrote:
> > Hi all,
> >
> > trying to split an array (String) I get an error.
> >
> >         String[] firstname = names.split(" ");
> > Do I have to import something?
> No, split is a method of String which is inside java.lang package
> which is imported by default, but if names is an array you have to get
> at the desired element of the array before applying split to it,
> something along:
> names[i].split(" ");
>
> Michèle Garoche
>
> --
> To post to this group, send email to 
javaprogrammingwithpassion@googlegroups.com
> To unsubscribe from this group, send email to 
javaprogrammingwithpassion+unsubscr...@googlegroups.com
> For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en

Cheers,
Michèle



--
To post to this group, send email to javaprogrammingwithpassion@googlegroups.com
To unsubscribe from this group, send email to 
javaprogrammingwithpassion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en

Reply via email to