Originally posted by Sean Casey:
Ravindra,
c is incorrect since volatile can't be used with the final keyword. Try to compile it yourself. d is incorrect since there is no reference type. Try to compile them yourself. Transient can't be used with the final keyword either. At least that's what my compiler tells me.
Hi Sean,
You are right -
final and volatile won't go together.
However the combination of transient and final is fine. The reason you got a compilation error is because the declaration shown in the question was wrong - try this:
public transient final int i = 10;
Take care,
- Lam -