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

Explain purpose of sleep() method in java?

1170


What is namespace in java?

1062


Which variables are stored in heap?

1083


When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?

1149


What is a percentage sign called?

1193


Why map is used in java?

1085


What do you mean by synchronized non access modifier?

1047


What is array command?

1262


What is mutable object and immutable object?

1177


What is mean by exception?

1078


Explain the public class modifier?

996


Explain about java sdk?

1084


What is an example of a conditional statement?

1101


Is there a way to increase the size of an array after its declaration?

1086


Explain inner classes ?

1173