Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #1443
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!novia!news-out.readnews.com!news-xxxfer.readnews.com!s09-11.readnews.com!unm2.readnews.com.POSTED!not-for-mail |
|---|---|
| X-Trace | DXC=NHYV3<fU_ok:mHlS0i@1`lk\2KDSF=2@bFV0LA4MIjQkmTIDj6@1Wal^]]CW6JBjaiTA`X]=O@ZUnQXAoc\[EG3iE58\`NEoN;`1BI1KGeLIgo4Md=^D^90Zj20:`FRSgUKo |
| X-Complaints-To | killthespammer@usenetmonster.com |
| From | "Thee Chicago Wolf [MVP]" <.@.> |
| Newsgroups | comp.lang.java.help |
| Subject | Re: Easy way to read the contants of a folder/directory and output contents to file? |
| Date | Mon, 12 Dec 2011 12:03:00 -0600 |
| Organization | . |
| Reply-To | . |
| Message-ID | <9jfce7h85it7g77fe56jhihjla9p9mdrf0@4ax.com> (permalink) |
| References | <e5rae71q7jppj0ms8jn0sc0qp636gn3csj@4ax.com> <dir-20111212093056@ram.dialup.fu-berlin.de> <hn4ce7t0gdu40rgrfaj9546mepb3kcnhm7@4ax.com> <m3obvdpxkz.fsf@despammed.com> <k5cce75e2aqlfk5vmqvsll2jopa48hj3bc@4ax.com> <jc5ea2$pqr$1@dont-email.me> |
| X-Newsreader | Forte Agent 6.00/32.1186 |
| X-No-Archive | yes |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| Lines | 27 |
| NNTP-Posting-Host | 146805ea.newsreader.readnews.com |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.help:1443 |
Show key headers only | View raw
>On 12/12/2011 11:54 AM, Thee Chicago Wolf [MVP] wrote:
>>[...]
>> Realistically, these two statements work exactly the same:
>>
>> outFile.print(String.valueOf(list[i]+"\n"));
>> outFile.write(String.valueOf(list[i]+"\n"));
>
> If you want to become a programmer, you'll need to develop
>an eye for detail ...
>
> Also, it's *still* silly to take String.valueOf(a_String).
>Why not String.valueOf(String.valueOf(String.valueOf("Hello!")))?
Well, I have to crawl before I can walk, and walk before I can run. I
can see now that's not necessary to use the String.valueOf because I'm
writing a String so it's just redundant to add the method. But from my
original post, please recall that I stated I was re-using my old code.
What I did not mention was that in my original code I was writing an
integer--not a String as is in this case--to a file. So in that case I
needed String.valueOf to grab the integer and convert it to a String.
So on the surface, yes, it looked clumsy but only because it was
re-used code and I wasn't paying such close attention to that part. In
any case, thanks for pointing it out to me. It's the little stuff I
miss that will help me write better code as I learn (and am taught).
Thanks!
- Thee Chicago Wolf [MVP]
Back to comp.lang.java.help | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Easy way to read the contants of a folder/directory and output contents to file? "Thee Chicago Wolf (MVP)" <.@.> - 2011-12-11 21:06 -0600
Re: Easy way to read the contants of a folder/directory and output contents to file? "John B. Matthews" <nospam@nospam.invalid> - 2011-12-11 23:08 -0500
Re: Easy way to read the contants of a folder/directory and output contents to file? "Thee Chicago Wolf [MVP]" <.@.> - 2011-12-12 08:42 -0600
Re: Easy way to read the contants of a folder/directory and output contents to file? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-12-12 14:49 +0000
Re: Easy way to read the contants of a folder/directory and output contents to file? "Thee Chicago Wolf [MVP]" <.@.> - 2011-12-12 09:12 -0600
Re: Easy way to read the contants of a folder/directory and output contents to file? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-12-12 15:44 +0000
Re: Easy way to read the contants of a folder/directory and output contents to file? "Thee Chicago Wolf [MVP]" <.@.> - 2011-12-12 09:51 -0600
Re: Easy way to read the contants of a folder/directory and output contents to file? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-12-12 10:03 -0500
Re: Easy way to read the contants of a folder/directory and output contents to file? "Thee Chicago Wolf [MVP]" <.@.> - 2011-12-12 09:15 -0600
Re: Easy way to read the contants of a folder/directory and output contents to file? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-12-12 10:45 -0500
Re: Easy way to read the contants of a folder/directory and output contents to file? "Thee Chicago Wolf [MVP]" <.@.> - 2011-12-12 09:52 -0600
Re: Easy way to read the contants of a folder/directory and output contents to file? Roedy Green <see_website@mindprod.com.invalid> - 2011-12-12 01:02 -0800
Re: Easy way to read the contants of a folder/directory and output contents to file? "Thee Chicago Wolf [MVP]" <.@.> - 2011-12-12 09:19 -0600
Re: Easy way to read the contants of a folder/directory and output contents to file? "Thee Chicago Wolf [MVP]" <.@.> - 2011-12-12 09:08 -0600
Re: Easy way to read the contants of a folder/directory and output contents to file? Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2011-12-12 18:24 +0200
Re: Easy way to read the contants of a folder/directory and output contents to file? "Thee Chicago Wolf [MVP]" <.@.> - 2011-12-12 10:54 -0600
Re: Easy way to read the contants of a folder/directory and output contents to file? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-12-12 12:40 -0500
Re: Easy way to read the contants of a folder/directory and output contents to file? "Thee Chicago Wolf [MVP]" <.@.> - 2011-12-12 12:03 -0600
Re: Easy way to read the contants of a folder/directory and output contents to file? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-12-12 13:04 -0500
csiph-web