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

What is the purpose of format function?

1239


Is ++ operator thread-safe in java?

1236


What super () does in java?

966


What is meant by oops concept in java?

1051


What is the difference between yield() and sleep()?

1066


Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?

1134


If you are given the name of the function at run time how will you invoke the function?

1188


What is derived datatype?

1271


What is initial size of arraylist in java?

1101


Explain the use of shift operator in java. Can you give some examples?

1037


Explain the difference between map and flatmap stream operation?

1310


java Technical questions asked by JPMC

5143


What is the java idl system?

1086


Explain java coding standards for constants?

1066


Are static members inherited to sub classes?

1187