Originally posted by Sheetal Kaul: Oh sorry, it should give error at line 1, byte a,b=5,c;
is it legal statement? yes then why?
You have declared 3 variables a, b and c of type byte, and are initializing b alone to 5. That's fine. You can mix declaration and initialization in one statement.
It is combination of variable declaration and initialization.It is perfectly legal declaration & initialization of instance member variable or local variable.
Raghu J<br />SCJP 1.4<br /> <br />The Wind and waters are always<br />on the side of the ablest navigators.<br /><a href="http://groups.yahoo.com/group/scjp_share" target="_blank" rel="nofollow">SCJP Group</a><br /><a href="http://groups.yahoo.com/group/JavaBeat_SCWCD" target="_blank" rel="nofollow">SCWCD Group</a>
They worship nothing. They say it's because nothing is worth fighting for. Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards