Can we declare static variables in JSP page.

Answer Posted / srinu

yes we declare the varible as static in a jsp.we declare the
static varible in the declaration tag.
ex:-
<%! static int a=10;%>

Is This Answer Correct ?    12 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the major drawback of internal iteration over external iteration?

582


Explain abstract class in java?

552


What is the size of a string in java?

538


Explain the use of volatile field modifier?

627


You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain

526






Tell me the Importent classes in net package?

1578


What is a bubble sort in java?

539


How use .contains in java?

614


Explain the selection sort algorithm?

636


What does flag mean in java?

536


Can we overload run() method in java?

589


Can a class have multiple superclasses?

559


What are the steps involved to create a bean?

676


What is constructor chaining and how is it achieved in java?

564


How can we create objects if we make the constructor private ?

535