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 are the important features of Java 9 release?

949


Can we have 2 main methods in java class?

949


What do you understand by access specifiers in Java?

961


what is bmg file and how to create that files?what will it contailn?

2296


What are the features of junit?

996


What are computer functions?

881


What exactly is java?

886


What is nan in java?

941


If I only change the return type, does the method become overloaded?

874


What is the difference between access specifiers and access modifiers in java? 16

954


Are arrays classes in java?

966


What is use of map in java?

950


What are the basic control structures?

924


How do you insert a line break?

855


Is a char always 1 byte?

931