Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #3559
| X-Received | by 10.107.157.11 with SMTP id g11mr40724647ioe.7.1441186359811; Wed, 02 Sep 2015 02:32:39 -0700 (PDT) |
|---|---|
| X-Received | by 10.182.104.232 with SMTP id gh8mr517017obb.41.1441186359789; Wed, 02 Sep 2015 02:32:39 -0700 (PDT) |
| Path | csiph.com!xmission!news.glorb.com!kq10no364075igb.0!news-out.google.com!f6ni12614igi.0!nntp.google.com!kq10no364070igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.java.help |
| Date | Wed, 2 Sep 2015 02:32:39 -0700 (PDT) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=122.172.94.200; posting-account=XxmJUQoAAAAKpF1KjsxZ6MbrT8mfdSSp |
| NNTP-Posting-Host | 122.172.94.200 |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <2e7b7127-78fb-4acb-a31d-0229544de3f7@googlegroups.com> (permalink) |
| Subject | compiler error <identifier> expected. |
| From | tejanaidu.b@gmail.com |
| Injection-Date | Wed, 02 Sep 2015 09:32:39 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Xref | csiph.com comp.lang.java.help:3559 |
Show key headers only | View raw
Hi Team,
I'm new to Java when I write a program for class and objects, when I try to compile the program getting an error message saying "error: <identifier> expected"
Here is the program.
class Card
{
int icount;
Static int tcount;
void swipe()
{
icount++;
tcount++;
}
}
class Demo9
{
public static void main(Static ar[])
{
Card v= new Card();
Card b= new Card();
v.swipe();
b.swipe();
b.swipe();
v.swipe();
v.swipe();
int total= Card.tcount;
int Vikas= v.icount;
int banu= b.icount;
System.out.println("Total students" + total);
System.out.println("Vikas students" + vikas);
System.out.println("Banu students" + banu);
}
}
Truly appreciate your response.
Back to comp.lang.java.help | Previous | Next — Next in thread | Find similar
compiler error <identifier> expected. tejanaidu.b@gmail.com - 2015-09-02 02:32 -0700 Re: compiler error <identifier> expected. Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2015-09-02 14:18 +0300 Re: compiler error <identifier> expected. Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-09-02 08:29 -0400
csiph-web