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 an Exception ?
Can static methods be overridden?
What is append function?
What is indexof?
Is vector ordered in java?
What is the reason behind using constructors and destructors?
What 4 doubled?
Can we override private method?
Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.
What is java full form?
Can java cast null?
what is platform dependent translation and platform dependent programming language