Can we declare variables inside a method as Final Variables?
Answers were Sorted based on User's Feedback
Answer / therathna
write a small program and check ur system
we can use final variable method
Is This Answer Correct ? | 15 Yes | 2 No |
Answer / srinu
yes we can declare a varible as final variable inside method
public class Finalv
{
public void m1()
{
final int a=10;
System.out.println(a);
}
public static void main(String k[])
{
Finalv f=new Finalv();
f.m1();
}
}
Is This Answer Correct ? | 13 Yes | 0 No |
What is the independent variable in an experiment?
Define reflection.
Can a static class have a constructor java?
What language is java written?
Why char array is preferred over string for storing password?
difference between java ,c#&java,c++
What is string in java with example?
What state does a thread enter when it terminates its processing in java programming?
What is static keyword in java?
What is a short in java?
Is a boolean 1 bit?
How to deprecate a method? Show it with proper example. Plz give the answer of this.Thanx in advance. mail me: tanzeem.akhtar@gmail.com