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

Define array. Tell me about 2-D array.

997


What are void methods?

979


Can we have a method name same as class name in java?

992


Can we inherit inner class?

957


What is java reflection?

920


Which collection is sorted in java?

981


How finally used under exception handling?

896


What is the difference between jvm and jre? What is an interface?

1013


When arithmeticexception is thrown?

965


Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?

982


Can a class declared as private be accessed outside it’s package?

949


What is main in java?

1056


What is core java called?

920


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread

955


What is valid keyword in java?

933