Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #3085
| Newsgroups | comp.lang.java.help |
|---|---|
| Date | 2014-11-07 07:07 -0800 |
| References | <29442c5a-69a2-451a-88f0-25a5e0b9937e@googlegroups.com> |
| Message-ID | <21b2fb24-2daa-4a8d-8cf3-a77e6f1e1f9b@googlegroups.com> (permalink) |
| Subject | Re: Compile error: java: <identifier> expected |
| From | abiolaquadri1987@gmail.com |
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 | Next — Previous in thread | Next in thread | Find similar
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