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 |
Can we force garbage collector to run ?
Which collection is ordered in java?
What is the exact difference in between Unicast and Multicast object ?
Can we clone singleton object?
Difference between overloading and overridding?
what is the difference between process and thread? : Java thread
What is javac_g?
what is the difference between equals method and ==
17 Answers IBM, Professional Access, TCS,
Is string a data type in java?
What do you understand by access specifiers in Java?
What is the difference between equals() and == in java?
Can we declare static variables in JSP page.