Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #8540
| 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.16.MISMATCH!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!x19g2000vbl.googlegroups.com!not-for-mail |
|---|---|
| From | Chad <cdalten@gmail.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: I don't why I get 'not a statement' error in the following code... |
| Date | Tue, 4 Oct 2011 11:43:03 -0700 (PDT) |
| Organization | http://groups.google.com |
| Lines | 32 |
| Message-ID | <0441a828-514e-45b9-8481-ddb105e25d5f@x19g2000vbl.googlegroups.com> (permalink) |
| References | <de7d2141-f562-452d-b754-46cab58ef211@d18g2000yql.googlegroups.com> <ut2dnZcFmYX1zBbTnZ2dnUVZ_q2dnZ2d@earthlink.com> |
| NNTP-Posting-Host | 130.212.3.51 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | posting.google.com 1317753784 13721 127.0.0.1 (4 Oct 2011 18:43:04 GMT) |
| X-Complaints-To | groups-abuse@google.com |
| NNTP-Posting-Date | Tue, 4 Oct 2011 18:43:04 +0000 (UTC) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | x19g2000vbl.googlegroups.com; posting-host=130.212.3.51; posting-account=kTs1ygoAAACgG1TSoyECpovEyy-V6_8b |
| User-Agent | G2/1.0 |
| X-Google-Web-Client | true |
| X-Google-Header-Order | ARLUEHNKC |
| X-HTTP-UserAgent | Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; .NET4.0C; .NET4.0E),gzip(gfe) |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8540 |
Show key headers only | View raw
On Oct 4, 11:33 am, Patricia Shanahan <p...@acm.org> wrote: > On 10/4/2011 11:16 AM, Chad wrote: > ... > > > I don't get why 'Test.x;' in main() isn't a variable. The expression > > 'Test.x' ends with a semicolon. So I just assumed it was a valid > > statement. However, the java compiler tells me something different. > > Ideas? Possible hints? > > See the JLS,http://java.sun.com/docs/books/jls/third_edition/html/statements.html... > > Only certain types of expressions can be turned into a statement by > adding a semicolon. They all have at least potential for side-effects at > the top level. > > May I ask why you need to execute Test.x without doing anything with the > result? > Because I was trying to figure out the error. The actual line of code is something like Test.x += x; But when I stripped the line to Test.x; I got the same error. Chad
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
I don't why I get 'not a statement' error in the following code... Chad <cdalten@gmail.com> - 2011-10-04 11:16 -0700
Re: I don't why I get 'not a statement' error in the following code... Patricia Shanahan <pats@acm.org> - 2011-10-04 11:33 -0700
Re: I don't why I get 'not a statement' error in the following code... Chad <cdalten@gmail.com> - 2011-10-04 11:43 -0700
Re: I don't why I get 'not a statement' error in the following code... markspace <-@.> - 2011-10-04 12:14 -0700
Re: I don't why I get 'not a statement' error in the following code... Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-10-04 12:20 -0700
Re: I don't why I get 'not a statement' error in the following code... Chad <cdalten@gmail.com> - 2011-10-04 14:55 -0700
Re: I don't why I get 'not a statement' error in the following code... Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-10-04 15:09 -0700
Re: I don't why I get 'not a statement' error in the following code... Chad <cdalten@gmail.com> - 2011-10-04 15:11 -0700
Re: I don't why I get 'not a statement' error in the following code... Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-10-04 17:30 -0700
Re: I don't why I get 'not a statement' error in the following code... Stanimir Stamenkov <s7an10@netscape.net> - 2011-10-05 01:19 +0300
Re: I don't why I get 'not a statement' error in the following code... Patricia Shanahan <pats@acm.org> - 2011-10-04 22:16 -0700
Re: I don't why I get 'not a statement' error in the following code... Chad <cdalten@gmail.com> - 2011-10-05 08:13 -0700
Re: I don't why I get 'not a statement' error in the following code... Patricia Shanahan <pats@acm.org> - 2011-10-05 10:21 -0700
Re: I don't why I get 'not a statement' error in the following code... Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-10-05 20:43 -0400
Re: I don't why I get 'not a statement' error in the following code... markspace <-@.> - 2011-10-05 19:36 -0700
Re: I don't why I get 'not a statement' error in the following code... Lew <lewbloch@gmail.com> - 2011-10-05 19:43 -0700
Re: I don't why I get 'not a statement' error in the following code... Roedy Green <see_website@mindprod.com.invalid> - 2011-10-05 12:00 -0700
csiph-web