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 / vijayakumar chinnasamy

No static variable cannot be declared within static/non-
static method.

only "final" and "default" allowed within in method for
variable declaration. i.e u cant use
private,protected,public,static within method .it display
the compile time error "Illegal modifier".

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What will be the initial value of an object reference which is defined as an instance variable?

1079


Write a function for palindrome and factorial and explain?

1027


What is prefix of a string?

977


what is daemon thread and which method is used to create the daemon thread? : Java thread

907


when you will synchronize a piece of your code? : Java thread

962


What is class level lock ?

976


Can a serialized object be transferred via network?

898


How do you write a good declaration?

908


What is the difference between dom and sax parser in java?

924


What does @override mean?

1108


What is the purpose of format function?

1082


What does string [] args mean?

955


What is meant by stack and queue?

994


What is string pool?

1029


What is sortedmap in java?

977