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 |
Difference between this(), super()?
12 Answers College School Exams Tests, Oracle,
What is the equal sign?
What is meant by tab pans?
What is meant by overloading?
Explain about sets?
explain System.out.println
107 Answers Calpine Technologies, Care, Cognizant, CTS, IBM, IBS, LibSys, Oracle, Spiro Solutions, TCS,
What are the java ide’s?
Can we have return statement in finally clause? What will happen?
What is the function of compareto in java?
What are nested classes in java?
what is unreachable code problem in multiple catch statements
How hashset works internally in java?