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 / ali

No Static Variable cannot declare in method.
but the method present in class can access the static variable
of class.
Or the method which is trying to access the static variable of
class but method is not part of that class at that time declare method as static then it can access that static variable.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain wait() method of object class ?

1144


What is square root in java?

1042


Can we convert list to set in java?

926


What type of value does sizeof return?

957


How can you make a class serializable in java?

946


How do you convert string to int in java?

1024


What is the technique adopted to create an immutable class?

1045


Explain about core java?

1066


How to convert string to char and vice versa?

964


What is proper subset?

927


What is loop in java?

935


What is a heavyweight component?

989


How would overload a function based on return type?

925


what methods would you overwrite in java.lang.object class?

958


What are the advantages of packages in java?

1454