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
What is the lifetime and scope of a variable?
How do you input a string in java?
What is the default size of load factor in hashing based collection?
What is string [] args?
Write a program in java to find the maximum and minimum value node from a circular linked list.
Explain the use of javap tool.
Why do we use variables?
How will you print number in reverse (descending) order in BST.
What is array class in java?
How do you convert string to int in java?
How do you implement tree mirroring in java?
What is an enumeration?
Can a class declared as private be accessed outside it’s package?
What are the important methods of java exception class?
What is an iterator java?