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


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

Re: Compile error: java: <identifier> expected

X-Received by 10.42.86.69 with SMTP id t5mr14667510icl.33.1415372869715; Fri, 07 Nov 2014 07:07:49 -0800 (PST)
X-Received by 10.140.19.193 with SMTP id 59mr23181qgh.19.1415372869680; Fri, 07 Nov 2014 07:07:49 -0800 (PST)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!r10no5121570igi.0!news-out.google.com!u5ni26qab.1!nntp.google.com!u7no3113482qaz.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.help
Date Fri, 7 Nov 2014 07:07:49 -0800 (PST)
In-Reply-To <29442c5a-69a2-451a-88f0-25a5e0b9937e@googlegroups.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=69.163.40.212; posting-account=TnvAbgoAAADYIyXNE98UkP3edYkcUyln
NNTP-Posting-Host 69.163.40.212
References <29442c5a-69a2-451a-88f0-25a5e0b9937e@googlegroups.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <21b2fb24-2daa-4a8d-8cf3-a77e6f1e1f9b@googlegroups.com> (permalink)
Subject Re: Compile error: java: <identifier> expected
From abiolaquadri1987@gmail.com
Injection-Date Fri, 07 Nov 2014 15:07:49 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.java.help:3085

Show key headers only | View raw


On Monday, October 14, 2013 6:33:25 AM UTC-7, Marc B wrote:
> Hello,
> 
> I am new to Java. I create a reference variable, and then call a final method on that variable but on compilation I get this error:
> 
> java: <identifier> expected
> 
> pointing to the last line - p.sing();
> 
> This is my code:
> 
> class MyClass{
>     public static void main(String[] args){
> 
>     }
> }
> 
> class Person {
>     final void sing() {
>         System.out.println("la..la..la..");
>     }
> }
> class Professor {
>     final void singalong() {
>         System.out.println("la..la..la..");
>     }
>     Person p = new Person();
>     p.sing();
> }
> 
> What does the error mean? What identifier needs to be present on that line p.sing();???
> 
> Thanks,
> 
> Marc

I'm new here and have got some issues to post,but can't just get it posted.How do i do that?

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


Thread

Compile error: java: <identifier> expected Marc B <marc.at.compass@gmail.com> - 2013-10-14 06:33 -0700
  Re: Compile error: java: <identifier> expected Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-10-14 10:11 -0400
    Re: Compile error: java: <identifier> expected Marc B <marc.at.compass@gmail.com> - 2013-10-14 08:23 -0700
  Re: Compile error: java: <identifier> expected Roedy Green <see_website@mindprod.com.invalid> - 2013-10-21 20:33 -0700
  Re: Compile error: java: <identifier> expected abiolaquadri1987@gmail.com - 2014-11-07 07:07 -0800
  Re: Compile error: java: <identifier> expected rockz.world143@gmail.com - 2015-08-28 10:17 -0700

csiph-web