Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #11094

Re: please help understanding syntax

From Steven Simpson <ss@domain.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: please help understanding syntax
Date 2012-01-07 22:55 +0000
Organization Aioe.org NNTP Server
Message-ID <s4vmt8-k5m.ln1@news.simpsonst.f2s.com> (permalink)
References <7e21b19b-356f-4a0b-ae08-687fc79e1afa@dp8g2000vbb.googlegroups.com>

Show all headers | View raw


On 07/01/12 21:15, 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() { ...'.

...

-- 
ss at comp dot lancs dot ac dot uk

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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