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

What is the lifetime and scope of a variable?

1062


How do you input a string in java?

1148


What is the default size of load factor in hashing based collection?

1106


What is string [] args?

1063


Write a program in java to find the maximum and minimum value node from a circular linked list.

1155


Explain the use of javap tool.

1186


Why do we use variables?

1048


How will you print number in reverse (descending) order in BST.

1042


What is array class in java?

1118


How do you convert string to int in java?

1145


How do you implement tree mirroring in java?

1125


What is an enumeration?

1121


Can a class declared as private be accessed outside it’s package?

1064


What are the important methods of java exception class?

1211


What is an iterator java?

1203