Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: comma-separated floats Date: Tue, 4 Oct 2011 08:40:36 -0700 (PDT) Organization: http://groups.google.com Lines: 20 Message-ID: <21508759.1902.1317742836345.JavaMail.geo-discussion-forums@prfp13> References: Reply-To: comp.lang.java.programmer@googlegroups.com NNTP-Posting-Host: 65.50.220.43 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1317742966 32389 127.0.0.1 (4 Oct 2011 15:42:46 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 4 Oct 2011 15:42:46 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=65.50.220.43; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8527 markspace wrote: > bob wrote: >> What is the easiest way to convert a bunch of comma-separated floats >> into float[]? >> >> String s = >> "5.792327,13.093715,-1.47686,15.495049,12.842123,-2.455942,1.326654,12.842123,0.000000"; >> >> float[] f = ? > > Perhaps something like > > Scanner scanner = new Scanner( s ); > scanner.useDelimeter( "," ); Uh-uh. 'scanner.useDelimiter( "," );' -- Lew