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

How to disable caching on back button of the browser?

1085


Name few java 8 annotations ?

1026


What is struts in java?

1039


What do you mean by stream pipelining in java 8?

1229


What is a return in java?

1029


What is keyword in oop?

953


Is java an ide?

981


What is command line used for?

1093


Can I import same package/class twice?

952


What does  mean in regex?

1056


What do you understand by copy constructor in java?

931


Which is best ide for java?

1044


What is the formula to calculate percentage?

1018


What is primitive data type in java?

981


When is the arraystoreexception thrown?

1025