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

Are static members inherited to sub classes?

1140


How do you override a private method in java?

980


What is the difference between an inner class and a sub-class?

1016


What is merge sort in java?

977


What are the main differences between notify and notifyAll in Java?

1094


How can we make a class singleton?

1073


What is an argument in java?

941


What is the difference between yielding and sleeping?

1112


What is java virtual machine and how it is considered in context of java’s platform independent feature?

1173


What do you mean by chromounits in java8?

957


What is a percentage sign called?

1123


What is Gang of four design patterns

1051


How do you define a set in java?

1017


What is a java applet? What is an interface?

1098


What are the differences between graph and tree?

1122