Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: Steven Simpson Newsgroups: comp.lang.java.programmer Subject: Re: please help understanding syntax Date: Sat, 07 Jan 2012 22:55:55 +0000 Organization: Aioe.org NNTP Server Lines: 36 Message-ID: References: <7e21b19b-356f-4a0b-ae08-687fc79e1afa@dp8g2000vbb.googlegroups.com> NNTP-Posting-Host: z5mVTYUYMEmb3DSn9kC+DQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11094 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