Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we declare variables inside a method as Final Variables?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is Classloader in Java?

1220


What is constant in programming?

1112


How can we run a java program without making any object?

1044


What language is pass by reference?

1019


what is mena by object block any what is the use of that

2216


What is structure of java heap? What is perm gen space in heap?

1127


How to calculate the length of a singly linked list in java?

1035


What is the difference between static method and instance method in Java?

1209


Difference between class#getinstance() and new operator ?

1209


Does treeset allow null in java?

956


How can we create objects if we make the constructor private ?

1015


List some java keywords sun like c, c + + keywords?

1004


What do heavy weight components mean in java programming?

952


what is the difference between yielding and sleeping? : Java thread

967


What are the differences between processes and threads?

1067