Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe27.iad.POSTED!not-for-mail From: Arved Sandstrom User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Reading a File References: <4c68b43b-ee08-48fc-91fe-7f3f81213f69@vb8g2000pbb.googlegroups.com> <1f99c3e0-3582-4487-8db2-af8c703c1222@googlegroups.com> In-Reply-To: <1f99c3e0-3582-4487-8db2-af8c703c1222@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Lines: 17 Message-ID: X-Complaints-To: abuse@newsgroups-download.com NNTP-Posting-Date: Sat, 26 Jan 2013 12:01:47 UTC Organization: Public Usenet Newsgroup Access Date: Sat, 26 Jan 2013 08:01:46 -0400 X-Received-Bytes: 1612 Xref: csiph.com comp.lang.java.programmer:21735 On 01/26/2013 02:48 AM, Lew wrote: > subhaba...@... wrote: >> Thank you Sir. It worked. Regards,Subhabrata. > > Actually, no, it didn't, but the bugs are of a nature that doesn't bother you yet. > Depends on how you run it as to whether that filename actually locates the source file. Overall the program itself "works". main() throws an exception, which may be acceptable for a console app. Hardcoding the filename isn't a defect unless you have a requirement to specify variable files. Having it in the default package ain't great, along with not using braces for the loop I'd nominate this as a latent defect. AHS