Hi, I am having a static method .In the method when I decalare a variable , it was showing an error in eclipse saying that the variable should be decalared as final. Can I know the reason for this , y should a variable in a static method be declared as final? I am writng an Android application where I should pass as an argument current Context of that application. So, when I pass the current context to the method and trying to copy it in a local variable , I am getting this error saying that the variable should be declared as final. my method is like this:
public static void myfunc(Context ctx, int a)
{
Context myctx=ctx;
}
error is showing at line where Context myctx=ctx; is declared and asking me to declare it as final.