Welcome! Register for a free account (or login) > How does it work?
|
|


Apr 17 2008, 05:00 AM
Post
#1
|
|
|
New Member ![]() Group: New Member Posts: 5 Joined: 29-January 08 Member No.: 76,401 Operating System: windows 98, XP |
Hi..
I am new to java and need a help on this part I am declaring a variable as below and it is showing error.. as identifier required.. help me out to understand the reason behind the same.. class abc { int a; a=10; // on this point it is asking for identifier reuired public static void main(String[] args) System.out.println(a); } as i have already declared int a, why cant i assisgn a=10 in the next statement Response ASAP .... appreciated.. Thanks in advance |
|
|
|
saffionline exception identifier required in java Apr 17 2008, 05:00 AM
Tom Herry Hi, Your code is
class abc
{
int a;
a=10; // on ... Apr 21 2008, 01:34 AM
jpshortstuff As Tom says, when you declare 'a' in your ... Apr 23 2008, 12:04 PM![]() ![]() |
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
22 | appleoddity | 5,121 | 13th March 2010 - 01:19 AM Last post by: appleoddity |
|||
![]() |
4 | damien44 | 117 | 12th March 2010 - 03:54 AM Last post by: Doug |
|||
![]() |
4 | manicd | 126 | 26th February 2010 - 07:27 PM Last post by: manicd |
|||
![]() |
15 | AplusWebMaster | 2,570 | 13th January 2010 - 03:22 PM Last post by: AplusWebMaster |
|||
|
Time is now: 21st March 2010 - 06:21 AM |