Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: glen herrmannsfeldt Newsgroups: comp.lang.java.programmer Subject: Re: Assigning void Date: Sat, 13 Oct 2012 17:05:00 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 23 Message-ID: References: NNTP-Posting-Host: 0usSS01PZ8AI54GFz6in7A.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org User-Agent: tin/1.9.6-20100522 ("Lochruan") (UNIX) (Linux/2.6.32-5-amd64 (x86_64)) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:19284 Jeff Higgins wrote: (snip) >> (server.getConnectionType() == ConnectionType.ACTIVE) ? >> ftp.enterLocalActiveMode() : ftp.enterLocalPassiveMode(); (snip) > Others have pointed you to the specification. > I don't know why it can't be a shorthand if-then-else statement too. Java isn't C. Java allows for method calls that return a value to ignore the return value, but other expressions that don't use the value seem not to be allowed. 2+2; is legal C, but not Java. -- glen