Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #1806
| From | "Lew" <lew@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: '{' expected |
| Message-ID | <jYydncMgENp6y_LbnZ2dnUVZ_q_inZ2d@comcast.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <1181696976.341554.101430@x35g2000prf.googlegroups.com> |
| Date | 2011-04-27 15:35 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui
pacvek@aol.com wrote:
> hi everyone, I'm new to the java world and I'm need of dire help, I
> have been given an assignment and for some reason I cannot compile, I
> keep getting the same error and even when I add an extra bracket the
> error gets greater, here is the program and hopefully someone can help
> me out.
>
> import java.text.DecimalFormat;
>
> public class Mortgage Payment Calculator {
...
> }
>
>
> }
>
> }
> }
> }
You should really cite all the information, including the full, *copied* and
pasted error message, within the body of the message, rather than merely
hinting at it in the subject. Nonetheless, it is clear what your difficulty is.
The error said '{' (left brace) expected, not right brace ('}'), so clearly
adding right braces will not help. Adding more right braces would help even
less. Why did you think right braces would help an error that refers to left
braces?
Where would the compiler expect a left brace? The first place is just after
the class name in the class declaration:
> public class Mortgage Payment Calculator {
but instead of a left brace, the compiler finds a token 'Payment' - whoops, a
left brace '{' expected, but not found!
You have three class names in the declaration instead of only one. Just use one.
--
Lew
---
* Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
'{' expected "pacvek" <pacvek@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "pacvek" <pacvek@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "pacvek" <pacvek@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "pacvek" <pacvek@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "pacvek" <pacvek@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "kaldrenon" <kaldrenon@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "Aziz" <aziz@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "JT" <jt@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "pacvek" <pacvek@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
Re: '{' expected "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
csiph-web