Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #1604
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Newsgroups | comp.lang.java.help |
| Subject | Re: Java problems |
| Date | 2012-02-22 20:06 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <vnebk7hoarh8tqhmv5v0rhfoaq5il2cj4v@4ax.com> (permalink) |
| References | <23d701bd-bccc-4969-af89-5d4ec320de06@w19g2000vbe.googlegroups.com> <ba197090-4f7c-450b-b741-7723b6ba25ef@f30g2000yqh.googlegroups.com> <vI2dnV11eJouANjSnZ2dnUVZ_u6dnZ2d@earthlink.com> |
On Wed, 22 Feb 2012 18:00:09 -0800, Patricia Shanahan <pats@acm.org>
wrote:
>On 2/22/2012 4:46 PM, Davej wrote:
>> On Feb 22, 5:40 pm, Chad Virginia<cmv...@gmail.com> wrote:
>>> I'm very new to Java and am having trouble understanding why this
>>> won't compile. I am getting an error that states "reached end of file
>>> while parsing". not sure how to remedy that. Any help?
>>
>> If your curly braces don't match up exactly one-for-one you will see
>> this sort of thing. There is no approximating with curly braces.
>> Likewise each parenthesis must be exactly paired.
>
>I agree. Here's a little more explanation and a suggestion.
>
>The "reached end of file while parsing" message means the compiler
>thought it was in the middle of parsing a class, and found the end of
>file before finding the end of the class. That is often caused by a
>missing closing brace.
>
>I suggest editing with an IDE or editor that has the ability to
>automatically format Java. Format early and often. A missing brace is
>much more obvious in correctly indented code.
Unterminated string constants and unterminated comments can also
cause trouble.
Sincerely,
Gene Wirchenko
Back to comp.lang.java.help | Previous | Next — Previous in thread | Next in thread | Find similar
Java problems Chad Virginia <cmv583@gmail.com> - 2012-02-22 15:40 -0800
Re: Java problems Jeff Higgins <jeff@invalid.invalid> - 2012-02-22 18:43 -0500
Re: Java problems Davej <galt_57@hotmail.com> - 2012-02-22 16:46 -0800
Re: Java problems Patricia Shanahan <pats@acm.org> - 2012-02-22 18:00 -0800
Re: Java problems Gene Wirchenko <genew@ocis.net> - 2012-02-22 20:06 -0800
Re: Java problems Roedy Green <see_website@mindprod.com.invalid> - 2012-02-23 23:43 -0800
csiph-web