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 are the steps involved to write rmi based programs?
Explain about Superclass and Subclass?
We can write any Java Logics in our JSP. Then why we are using servlets(Controller Layer) to interact with the DAO ?
Can variables be used in java without initialization?
Is array a class?
What are examples of modifiers?
There are 100 keys and values in HashMap.how to get the keys and values?
what is the difference between yielding and sleeping? : Java thread
What is an example of character?
When should I use abstract classes and when should I use interfaces?
what is the main difference between string and stringbuffer? can you explain it with program?
whats is the use of final,in which situation final can be used in the application?