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 destructors are defined in java?
Why is static used?
Give the difference between the println method and sqrt method?
What modifiers are used for interface declaration?
What is ide with example?
How to avoid the runtime exception ?
Write a program to print fibonacci series up to count 10.
How many unicode characters are there?
What is Three tier architecture. Can anyone explain with a Ordinary web application Project? (JSP,Servlets,JAVA,DAO) ?
Does unicode support all languages?
Can you make a constructor final in Java?
0 Answers SwanSoft Technologies,
How are the elements of a gridbaglayout organized in java programming?