Originally posted by rameshbabu yarlagadda: i know final variable are not reinitialized, but in the code i was not initialize the x value just i declared the x value, why can't initialize a final variable x in a method
Because you can't *initialize* a field in a method, you can only *change* it's value.
What value would the field have before you call the method?
What should happen if you call the method more than once?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus