Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #11102
| From | Lew <noone@lewscanon.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: please help understanding syntax |
| Date | 2012-01-07 20:58 -0800 |
| Organization | albasani.net |
| Message-ID | <jeb7pk$og5$1@news.albasani.net> (permalink) |
| References | <7e21b19b-356f-4a0b-ae08-687fc79e1afa@dp8g2000vbb.googlegroups.com> <s4vmt8-k5m.ln1@news.simpsonst.f2s.com> |
Steven Simpson wrote:
> John Goche wrote:
>> public void checkAccount(final Account account)
>> {
>> Auth.background()
>> {
>> @Override
>> public void run()
>> {
>> Auth.checkAccount(account, this, new CustomCallback()
>> {
>> @Override
>> public void handle(int resultCode)
>> {
>> // ...
>> }
>> });
>> }
>> });
>> }
>>
>> Can someone please explain the syntax Auth.background() { ... } .
>
> It's a syntax error, surely? Try sticking it in a syntax-aware editor with a
> 'class X { }' around it. When I add the closing brace in emacs, I'm told
> "Mismatched parentheses".
>
> Perhaps it's supposed to be 'new Auth.background()', though that's an
> unconventional name for a class.
>
> Perhaps it's supposed to be 'new Auth.background(new Runnable() { ...'.
>
> ...
Whatever it's supposed to be, the code at that site is not compilable, nor
does the author even provide complete classes. It is evidence that mere
presence on the Web does not make for good information.
--
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
please help understanding syntax John Goche <johngoche99@googlemail.com> - 2012-01-07 13:15 -0800
Re: please help understanding syntax Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-01-07 13:58 -0800
Re: please help understanding syntax Roedy Green <see_website@mindprod.com.invalid> - 2012-01-07 14:28 -0800
Re: please help understanding syntax Steven Simpson <ss@domain.invalid> - 2012-01-07 22:55 +0000
Re: please help understanding syntax Lew <noone@lewscanon.com> - 2012-01-07 20:58 -0800
Re: please help understanding syntax Steven Simpson <ss@domain.invalid> - 2012-01-08 08:25 +0000
Re: please help understanding syntax Roedy Green <see_website@mindprod.com.invalid> - 2012-01-16 02:05 -0800
csiph-web