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 |
How do you check if two strings are equal in java?
What are different types of expressions?
Explain the overview of UDP messaging.
What are the parts of a method?
Can we assign the reference to this variable?
What is an empty class? What functionality does it offer in Java?
0 Answers Deloitte, EXL, JPMorgan Chase,
What are the uses of java?
What will happen if non-synchronized method calls a static synchronized method and what kind of lock it acquires?
aabccdee Find the used alphabets as abcde ?
What do you understand by java virtual machine?
what should do when using multiple catch() block & what should never do for the same?
Why java is secure? Explain.