Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #3559
| Newsgroups | comp.lang.java.help |
|---|---|
| Date | 2015-09-02 02:32 -0700 |
| Message-ID | <2e7b7127-78fb-4acb-a31d-0229544de3f7@googlegroups.com> (permalink) |
| Subject | compiler error <identifier> expected. |
| From | tejanaidu.b@gmail.com |
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