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 we declare static variables in JSP page.

Answer Posted / rajender

yes

we should do in jsp declarative tag only.if we specify
variables in declaration tag, it belongs to class.
<%! static int i=0; %>

and u can not define static variable in scriptlet(<% %>).
as we know that we can not declare a static variable in a
method.

Is This Answer Correct ?    42 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

worst case complexities of Quick sort and Merge sort.

947


What does n mean in java?

922


What is serialization in java?

1006


What is a dot notation?

957


What is the do while loop syntax?

979


Describe what a thread-local variable is in java?

960


Are arrays primitive data types?

1099


What are scalar data types?

986


What is the difference between variable & constant?

963


Can I use % with real numbers?

962


What is thread pool? How can we create thread pool in java?

1012


Is namespace same as package in java?

935


what invokes a threads run() method? : Java thread

963


Do I need to import java.lang package any time? Why?

1309


What are predefined functions?

1061