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


Groups > comp.lang.java.help > #1123

Re: <identifier> expected error

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail
From Roedy Green <see_website@mindprod.com.invalid>
Newsgroups comp.lang.java.help
Subject Re: <identifier> expected error
Date Fri, 23 Sep 2011 17:10:11 -0700
Organization Canadian Mind Products
Lines 34
Message-ID <ii7q779k5782v8amlv5ersmm73hapv6964@4ax.com> (permalink)
References <c4db596b-eb82-4d41-bfd6-372b4037bfca@l2g2000vbn.googlegroups.com> <seko77pvl58ld3n7kbithfe65gtsrka76h@4ax.com> <7371102.30.1316805058374.JavaMail.geo-discussion-forums@prec11>
Reply-To Roedy Green <see_website@mindprod.com.invalid>
NNTP-Posting-Host RCd/Ul4tyxGUBII8WGwa5g.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
X-Notice Filtered by postfilter v. 0.8.2
X-Newsreader Forte Agent 6.00/32.1186
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.help:1123

Show key headers only | View raw


On Fri, 23 Sep 2011 12:10:58 -0700 (PDT), Lew <lewbloch@gmail.com>
wrote, quoted or indirectly quoted someone who said :

>  public interface NumList {
>    void printArray();
>  }
>
>The coaching might have been phrased, "Method declarations must specify the return type, or 'void' if nothing is to be returned."
>
>So I don't see "executable code" in the declaration, but "method defined without return type".  Either way it needs to be fixed.

I think "executable code" is one of several ways of interpreting the
error. 

printArray();

From a bottom up point of view looks to it like an attempt to invoke
the method printArray() which may be undefined.

I agree though your interpretation of the error fits better with what
the author intended.  Someday compilers might expend effort to decide
how to interpret errors.  I wrote
http://mindprod.com/jgloss/compileerrormessages.html
to at least give programmers several alternate interpretations
to choose from.
-- 
Roedy Green Canadian Mind Products
http://mindprod.com
It should not be considered an error when the user starts something
already started or stops something already stopped. This applies
to browsers, services, editors... It is inexcusable to 
punish the user by requiring some elaborate sequence to atone,
e.g. open the task editor, find and kill some processes.

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


Thread

<identifier> expected error Kathy Walker <kjata1013@gmail.com> - 2011-09-22 16:40 -0700
  Re: <identifier> expected error "John B. Matthews" <nospam@nospam.invalid> - 2011-09-22 20:54 -0400
    Re: <identifier> expected error Kathy Walker <kjata1013@gmail.com> - 2011-09-22 18:08 -0700
      Re: <identifier> expected error "John B. Matthews" <nospam@nospam.invalid> - 2011-09-22 21:24 -0400
  Re: <identifier> expected error Lew <lewbloch@gmail.com> - 2011-09-22 17:56 -0700
    Re: <identifier> expected error Kathy Walker <kjata1013@gmail.com> - 2011-09-22 18:09 -0700
  Re: <identifier> expected error Roedy Green <see_website@mindprod.com.invalid> - 2011-09-23 02:30 -0700
  Re: <identifier> expected error Roedy Green <see_website@mindprod.com.invalid> - 2011-09-23 02:32 -0700
    Re: <identifier> expected error Lew <lewbloch@gmail.com> - 2011-09-23 12:10 -0700
      Re: <identifier> expected error Roedy Green <see_website@mindprod.com.invalid> - 2011-09-23 17:10 -0700
        Re: <identifier> expected error Lew <lewbloch@gmail.com> - 2011-09-23 17:56 -0700
          Re: <identifier> expected error Roedy Green <see_website@mindprod.com.invalid> - 2011-09-25 00:13 -0700

csiph-web