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 you declare a static variable in a method?

Answer Posted / aravinda reddy

No we can't declare a static variable in a method or static
method, static variables are class level variables. Static
means one per class as per OO rules and method level
variables scope is with in the method. So if java allows
static variable inside a method, static concept is useless.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When will you define a method as static?

1032


List implementations of list interface?

983


How do you sort words in java?

876


Why singleton pattern is better than creating singleton class with static instance?

950


Can I learn java in 3 months?

959


What is the use of object and class classes?

991


Which object oriented concept is achieved by using overloading and overriding?

1038


Why packages are used?

1371


why would you use a synchronized block vs. Synchronized method? : Java thread

899


What does I ++ mean?

999


Why deletion in linkedlist is fast than arraylist?

1023


What is the super void?

840


What is field name?

946


Give any two differences between C++ and java.

1080


What is replacefirst in java?

1021