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

No we can't declare a static variable in a method.
only final and default scope variables are allowed inside
the method

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between postfix and prefix operators in java.

1087


What do you mean by pointer value and address?

1004


Can we rethrow the same exception from catch handler?

1086


What happens to a static var that is defined within a method of a class?

991


Which is the class in java?

990


How do you remove all elements from an arraylist in java?

959


How many threads can java run?

1061


How do you check whether the list is empty or not in java?

931


What is a instance variable in java?

992


I want to print “hello” even before main is executed. How will you acheive that?

1049


How do you check if an arraylist is not empty?

1065


What does java stand for?

1050


Can array grow dynamically in java?

923


What are the types of java languages?

933


Can we use both this () and super () in a constructor?

970