manish sahni wrote:
please help.... i can't understand...why the second one works..?
It works because of the final keyword. In your first one the compiler cannot guarentee that the value of s will always be able to fit within a byte. However, when you declare s as a final and it has a value that can fit in a byte, it will succeed because the value of s cannot change and will always fit within a byte.
SCJA
When I die, I want people to look at me and say "Yeah, he might have been crazy, but that was one zarkin frood that knew where his towel was."